mercurial/hgweb/common.py
changeset 7107 125c8fedcbe0
parent 7029 b84d27386285
child 7288 9c399c53469d
--- a/mercurial/hgweb/common.py	Sun Oct 05 21:35:26 2008 +0200
+++ b/mercurial/hgweb/common.py	Fri Oct 17 11:34:31 2008 -0700
@@ -82,10 +82,13 @@
     """
     locations = style and [os.path.join(style, "map"), "map-"+style] or []
     locations.append("map")
-    for location in locations:
-        mapfile = os.path.join(templatepath, location)
-        if os.path.isfile(mapfile):
-            return mapfile
+    if isinstance(templatepath, str):
+        templatepath = [templatepath]
+    for path in templatepath:
+        for location in locations:
+            mapfile = os.path.join(path, location)
+            if os.path.isfile(mapfile):
+                return mapfile
     raise RuntimeError("No hgweb templates found in %r" % templatepath)
 
 def paritygen(stripecount, offset=0):