hgweb: simplify a constant-length list by converting to literal tuple
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 05 Aug 2020 13:58:30 -0700
changeset 45315 2901133ec982
parent 45314 d12fba074cc6
child 45316 1b983985edd9
hgweb: simplify a constant-length list by converting to literal tuple The call to `.append()` has been unnecessary since d3dbdca92458 (hgweb: don't choke when an inexistent style is requested (issue1901), 2009-11-12). Differential Revision: https://phab.mercurial-scm.org/D8898
mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py	Wed Aug 05 13:33:07 2020 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Aug 05 13:58:30 2020 -0700
@@ -79,8 +79,7 @@
                 and pycompat.osaltsep in style
             ):
                 continue
-            locations = [os.path.join(style, b'map'), b'map-' + style]
-            locations.append(b'map')
+            locations = (os.path.join(style, b'map'), b'map-' + style, b'map')
 
             for location in locations:
                 mapfile = os.path.join(path, location)