diff -r 26eb62bd0550 -r da3b7c80aa34 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Thu Aug 13 10:37:25 2020 -0700 +++ b/mercurial/hgweb/webcommands.py Mon Aug 03 22:40:05 2020 -0700 @@ -1320,7 +1320,8 @@ static = web.config(b"web", b"static", untrusted=False) if not static: tp = web.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, web.res) return web.res.sendresponse()