hgweb: use sysstr to get attribute on diff option
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 01 Sep 2023 11:57:38 +0200
changeset 50915 d8c8a923ee9b
parent 50914 e586a7eb380a
child 50916 98b8836d0e82
hgweb: use sysstr to get attribute on diff option Attribute identifier should be `str` not `bytes`.
mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py	Thu Aug 31 01:19:49 2023 +0200
+++ b/mercurial/hgweb/webcommands.py	Fri Sep 01 11:57:38 2023 +0200
@@ -1050,7 +1050,9 @@
             }
 
     diffopts = webutil.difffeatureopts(web.req, web.repo.ui, b'annotate')
-    diffopts = {k: getattr(diffopts, k) for k in diffopts.defaults}
+    diffopts = {
+        k: getattr(diffopts, pycompat.sysstr(k)) for k in diffopts.defaults
+    }
 
     return web.sendtemplate(
         b'fileannotate',