diff mercurial/hgweb/hgweb_mod.py @ 30636:f1c9fafcbf46

py3: replace os.environ with encoding.environ (part 3 of 5)
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 18 Dec 2016 01:54:36 +0530
parents d83ca854fa21
children 9823e2f50a93
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Sun Dec 18 01:46:39 2016 +0530
+++ b/mercurial/hgweb/hgweb_mod.py	Sun Dec 18 01:54:36 2016 +0530
@@ -286,7 +286,8 @@
         Modern servers should be using WSGI and should avoid this
         method, if possible.
         """
-        if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."):
+        if not encoding.environ.get('GATEWAY_INTERFACE',
+                                    '').startswith("CGI/1."):
             raise RuntimeError("This function is only intended to be "
                                "called while running as a CGI script.")
         wsgicgi.launch(self)