merge with crew
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Wed, 15 Mar 2006 07:10:04 +0100
changeset 1957 295010327271
parent 1956 16750010813d (current diff)
parent 1955 2f500a4b6e99 (diff)
child 1958 f92cf4a8cedd
merge with crew
--- a/mercurial/templater.py	Wed Mar 15 07:09:42 2006 +0100
+++ b/mercurial/templater.py	Wed Mar 15 07:10:04 2006 +0100
@@ -8,7 +8,7 @@
 import re
 from demandload import demandload
 from i18n import gettext as _
-demandload(globals(), "cStringIO cgi os time urllib util")
+demandload(globals(), "cStringIO cgi sys os time urllib util")
 
 esctable = {
     '\\': '\\',
@@ -235,3 +235,7 @@
         p = os.path.join(os.path.dirname(__file__), *fl)
         if (name and os.path.exists(p)) or os.path.isdir(p):
             return os.path.normpath(p)
+    else:
+        # executable version (py2exe) doesn't support __file__
+        if hasattr(sys, 'frozen'):
+            return os.path.join(sys.prefix, "templates")