diff --git a/mercurial/templater.py b/mercurial/templater.py
index 91aa9bba3dc9869762896607cf6bacd84de2c59b_bWVyY3VyaWFsL3RlbXBsYXRlci5weQ==..4e9b39033d3fb398a0adea6cf6ba2d34dad07467_bWVyY3VyaWFsL3RlbXBsYXRlci5weQ== 100644
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -1057,7 +1057,7 @@
     return None
 
 
-def stylemap(styles, paths=None):
+def stylemap(styles, path=None):
     """Return path to mapfile for a given style.
 
     Searches mapfile in the following locations:
@@ -1066,10 +1066,8 @@
     3. templatepath/map
     """
 
-    if paths is None:
-        paths = [templatedir()]
-    elif isinstance(paths, bytes):
-        paths = [paths]
+    if path is None:
+        path = templatedir()
 
     if isinstance(styles, bytes):
         styles = [styles]
@@ -1087,9 +1085,8 @@
         locations = [os.path.join(style, b'map'), b'map-' + style]
         locations.append(b'map')
 
-        for path in paths:
-            for location in locations:
-                mapfile = os.path.join(path, location)
-                if os.path.isfile(mapfile):
-                    return style, mapfile
+        for location in locations:
+            mapfile = os.path.join(path, location)
+            if os.path.isfile(mapfile):
+                return style, mapfile
 
@@ -1095,2 +1092,2 @@
 
-    raise RuntimeError(b"No hgweb templates found in %r" % paths)
+    raise RuntimeError(b"No hgweb templates found in %r" % path)