[Updated] D8933: hgweb: handle None from templatedir() equally bad in webcommands.py

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sat Aug 22 23:32:15 UTC 2020


Closed by commit rHGda3b7c80aa34: hgweb: handle None from templatedir() equally bad in webcommands.py (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8933?vs=22412&id=22418

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8933/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8933

AFFECTED FILES
  mercurial/hgweb/webcommands.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -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()



To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200822/a66a863d/attachment-0002.html>


More information about the Mercurial-patches mailing list