# HG changeset patch # User Martin von Zweigbergk # Date 2020-08-05 20:58:30 # Node ID 2901133ec9824ed37d7b450865e9da2d4bfc95f2 # Parent d12fba074cc66d725b8bb615f1167a57b99575a0 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 diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -79,8 +79,7 @@ def _stylemap(styles, path=None): 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)