diff -r 4ccd5ec565c2 -r d5ccc059fbcd mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Wed Jul 22 00:09:17 2020 -0700 +++ b/mercurial/hgweb/hgwebdir_mod.py Fri Jul 24 11:24:59 2020 -0700 @@ -415,7 +415,8 @@ static = self.ui.config(b"web", b"static", untrusted=False) if not static: tp = self.templatepath or templater.templatedir() - static = [os.path.join(tp, b'static')] + if tp is not None: + static = [os.path.join(tp, b'static')] staticfile(static, fname, res) return res.sendresponse()