##// END OF EJS Templates
windows: check util.mainfrozen() instead of ad-hoc checks everywhere
Augie Fackler -
r14941:4a28cb4d default
parent child Browse files
Show More
@@ -31,7 +31,7 b' def loaddoc(topic):'
31 """Return a delayed loader for help/topic.txt."""
31 """Return a delayed loader for help/topic.txt."""
32
32
33 def loader():
33 def loader():
34 if hasattr(sys, 'frozen'):
34 if util.mainfrozen():
35 module = sys.executable
35 module = sys.executable
36 else:
36 else:
37 module = __file__
37 module = __file__
@@ -28,7 +28,7 b' def _pythonhook(ui, repo, name, hname, f'
28 'a module)') % (hname, funcname))
28 'a module)') % (hname, funcname))
29 modname = funcname[:d]
29 modname = funcname[:d]
30 oldpaths = sys.path
30 oldpaths = sys.path
31 if hasattr(sys, "frozen"):
31 if util.mainfrozen():
32 # binary installs require sys.path manipulation
32 # binary installs require sys.path manipulation
33 modpath, modfile = os.path.split(modname)
33 modpath, modfile = os.path.split(modname)
34 if modpath and modfile:
34 if modpath and modfile:
@@ -341,7 +341,7 b' def templatepath(name=None):'
341 normpaths = []
341 normpaths = []
342
342
343 # executable version (py2exe) doesn't support __file__
343 # executable version (py2exe) doesn't support __file__
344 if hasattr(sys, 'frozen'):
344 if util.mainfrozen():
345 module = sys.executable
345 module = sys.executable
346 else:
346 else:
347 module = __file__
347 module = __file__
General Comments 0
You need to be logged in to leave comments. Login now