changeset 50939:98b8836d0e82

hgweb: use sysstr to set attribute on diff option Attribute identifier should be `str` not `bytes`.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Sep 2023 12:09:54 +0200
parents d8c8a923ee9b
children 1a242d4d2ac4
files mercurial/hgweb/webutil.py
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py	Fri Sep 01 11:57:38 2023 +0200
+++ b/mercurial/hgweb/webutil.py	Fri Sep 01 12:09:54 2023 +0200
@@ -230,16 +230,16 @@
         ui, untrusted=True, section=section, whitespace=True
     )
 
-    for k in (
-        b'ignorews',
-        b'ignorewsamount',
-        b'ignorewseol',
-        b'ignoreblanklines',
+    for kb, ks in (
+        (b'ignorews', 'ignorews'),
+        (b'ignorewsamount', 'ignorewsamount'),
+        (b'ignorewseol', 'ignorewseol'),
+        (b'ignoreblanklines', 'ignoreblanklines'),
     ):
-        v = req.qsparams.get(k)
+        v = req.qsparams.get(kb)
         if v is not None:
             v = stringutil.parsebool(v)
-            setattr(diffopts, k, v if v is not None else True)
+            setattr(diffopts, ks, v if v is not None else True)
 
     return diffopts