mercurial/hgweb.py
changeset 1834 24881eaebee3
parent 1830 4ced57680ce7
child 1864 7a09785d3237
equal deleted inserted replaced
1833:fc959d6ffb13 1834:24881eaebee3
    18 def templatepath():
    18 def templatepath():
    19     for f in "templates", "../templates":
    19     for f in "templates", "../templates":
    20         p = os.path.join(os.path.dirname(__file__), f)
    20         p = os.path.join(os.path.dirname(__file__), f)
    21         if os.path.isdir(p):
    21         if os.path.isdir(p):
    22             return os.path.normpath(p)
    22             return os.path.normpath(p)
       
    23     else:
       
    24        # executable version (py2exe) doesn't support __file__
       
    25         if hasattr(sys, 'frozen'):
       
    26             return os.path.join(sys.prefix, "templates")
    23 
    27 
    24 def age(x):
    28 def age(x):
    25     def plural(t, c):
    29     def plural(t, c):
    26         if c == 1:
    30         if c == 1:
    27             return t
    31             return t