mercurial/hgweb/hgwebdir_mod.py
changeset 30636 f1c9fafcbf46
parent 30559 d83ca854fa21
child 30749 e38e7ea21987
--- a/mercurial/hgweb/hgwebdir_mod.py	Sun Dec 18 01:46:39 2016 +0530
+++ b/mercurial/hgweb/hgwebdir_mod.py	Sun Dec 18 01:54:36 2016 +0530
@@ -186,7 +186,8 @@
         self.lastrefresh = time.time()
 
     def run(self):
-        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)