diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -415,9 +415,7 @@ static = self.ui.config(b"web", b"static", untrusted=False) if not static: tp = self.templatepath or templater.templatedir() - if isinstance(tp, bytes): - tp = [tp] - static = [os.path.join(p, b'static') for p in tp] + static = [os.path.join(tp, b'static')] staticfile(static, fname, res) return res.sendresponse() diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -1320,9 +1320,7 @@ static = web.config(b"web", b"static", untrusted=False) if not static: tp = web.templatepath or templater.templatedir() - if isinstance(tp, bytes): - tp = [tp] - static = [os.path.join(p, b'static') for p in tp] + static = [os.path.join(tp, b'static')] staticfile(static, fname, web.res) return web.res.sendresponse()