# HG changeset patch # User Gregory Szorc # Date 2022-02-21 17:45:24 # Node ID 7dc430b85351016b7a9b38f1eb5c7c32d98cbd89 # Parent 0bb28b7736bc1bebb5e6021dfab3606f80baae08 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 diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -460,12 +460,9 @@ class hgwebdir(object): 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,