Mercurial > public > mercurial-scm > hg
comparison mercurial/templater.py @ 14941:4a28cb4df1f8
windows: check util.mainfrozen() instead of ad-hoc checks everywhere
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 16:14:02 -0500 |
parents | ab545a15d807 |
children | d3bb825ddae3 |
comparison
equal
deleted
inserted
replaced
14939:b4c06b97dfe0 | 14941:4a28cb4df1f8 |
---|---|
339 '''return location of template file or directory (if no name). | 339 '''return location of template file or directory (if no name). |
340 returns None if not found.''' | 340 returns None if not found.''' |
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__ |
348 for f in path: | 348 for f in path: |
349 if f.startswith('/'): | 349 if f.startswith('/'): |