Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

paths: search local paths for icons, etc. if not frozen

On development environment, it'll be good to look up dependencies from
local files.

Changeset d31437721836

Parent 154930824d72

by Yuya Nishihara

Changes to one file · Browse files at d31437721836 Showing diff from parent 154930824d72 Diff from another changeset...

 
10
11
12
13
 
14
15
16
 
64
65
66
67
68
69
70
71
 
 
 
 
 
 
 
72
73
74
 
10
11
12
 
13
14
15
16
 
64
65
66
 
 
 
 
 
67
68
69
70
71
72
73
74
75
76
@@ -10,7 +10,7 @@
 except ImportError:   icon_path, bin_path, license_path, locale_path = None, None, None, None   -import os +import os, sys    def find_root(path=None):   p = path or os.getcwd() @@ -64,11 +64,13 @@
  return None     def get_prog_root(): - try: - return _winreg.QueryValue(_winreg.HKEY_LOCAL_MACHINE, - r"Software\TortoiseHg") - except: - return os.path.dirname(os.path.dirname(os.path.dirname(__file__))) + if getattr(sys, 'frozen', False): + try: + return _winreg.QueryValue(_winreg.HKEY_LOCAL_MACHINE, + r"Software\TortoiseHg") + except: + pass + return os.path.dirname(os.path.dirname(os.path.dirname(__file__)))     def netdrive_status(drive):   """