version.py
changeset 1780 c52d1460cea8
parent 1768 691083b5682a
child 1803 da138c5a3063
equal deleted inserted replaced
1779:6cf16e5bfbf9 1780:c52d1460cea8
    52             cwd=app_dir
    52             cwd=app_dir
    53         )
    53         )
    54         rev = pipe.communicate()[0]
    54         rev = pipe.communicate()[0]
    55         if pipe.returncode != 0:
    55         if pipe.returncode != 0:
    56             rev = None
    56             rev = None
    57     except:
    57     except Exception:
    58         pass
    58         pass
    59 
    59 
    60     # if this is not mercurial repository
    60     # if this is not mercurial repository
    61     # try to read revision from file
    61     # try to read revision from file
    62     if rev is None:
    62     if rev is None:
    63         try:
    63         try:
    64             f = open(os.path.join(app_dir, "revision"))
    64             f = open(os.path.join(app_dir, "revision"))
    65             rev = f.readline()
    65             rev = f.readline()
    66         except:
    66         except Exception:
    67             pass
    67             pass
    68     return rev
    68     return rev
    69 
    69 
    70 
    70 
    71 def GetAboutDialogInfo():
    71 def GetAboutDialogInfo():