changeset 48995:7dc430b85351

hgweb: simplify uenv assignment We don't need the Python 3 conditional. We can call items() directly since we're on Python 3 now. Differential Revision: https://phab.mercurial-scm.org/D12307
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 10:45:24 -0700
parents 0bb28b7736bc
children 7eebe5630bcc
files mercurial/hgweb/hgwebdir_mod.py
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py	Mon Feb 21 10:43:58 2022 -0700
+++ b/mercurial/hgweb/hgwebdir_mod.py	Mon Feb 21 10:45:24 2022 -0700
@@ -460,12 +460,9 @@
                 if real:
                     # Re-parse the WSGI environment to take into account our
                     # repository path component.
-                    uenv = req.rawenv
-                    if pycompat.ispy3:
-                        uenv = {
-                            k.decode('latin1'): v
-                            for k, v in pycompat.iteritems(uenv)
-                        }
+                    uenv = {
+                        k.decode('latin1'): v for k, v in req.rawenv.items()
+                    }
                     req = requestmod.parserequestfromenv(
                         uenv,
                         reponame=virtualrepo,