comparison 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
comparison
equal deleted inserted replaced
30635:a150173da1c1 30636:f1c9fafcbf46
284 """Start a server from CGI environment. 284 """Start a server from CGI environment.
285 285
286 Modern servers should be using WSGI and should avoid this 286 Modern servers should be using WSGI and should avoid this
287 method, if possible. 287 method, if possible.
288 """ 288 """
289 if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."): 289 if not encoding.environ.get('GATEWAY_INTERFACE',
290 '').startswith("CGI/1."):
290 raise RuntimeError("This function is only intended to be " 291 raise RuntimeError("This function is only intended to be "
291 "called while running as a CGI script.") 292 "called while running as a CGI script.")
292 wsgicgi.launch(self) 293 wsgicgi.launch(self)
293 294
294 def __call__(self, env, respond): 295 def __call__(self, env, respond):