# HG changeset patch # User Pierre-Yves David # Date 2023-09-01 09:57:38 # Node ID d8c8a923ee9b38e36c8b0cc1b7fb95316b942cca # Parent e586a7eb380ad2e8796b01fd479ab241ddca6ac3 hgweb: use sysstr to get attribute on diff option Attribute identifier should be `str` not `bytes`. diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -1050,7 +1050,9 @@ def annotate(web): } 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',