Mercurial > hg
comparison mercurial/hgweb/hgwebdir_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 | e38e7ea21987 |
comparison
equal
deleted
inserted
replaced
30635:a150173da1c1 | 30636:f1c9fafcbf46 |
---|---|
184 prefix = prefix[:-1] | 184 prefix = prefix[:-1] |
185 self.prefix = prefix | 185 self.prefix = prefix |
186 self.lastrefresh = time.time() | 186 self.lastrefresh = time.time() |
187 | 187 |
188 def run(self): | 188 def run(self): |
189 if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."): | 189 if not encoding.environ.get('GATEWAY_INTERFACE', |
190 '').startswith("CGI/1."): | |
190 raise RuntimeError("This function is only intended to be " | 191 raise RuntimeError("This function is only intended to be " |
191 "called while running as a CGI script.") | 192 "called while running as a CGI script.") |
192 wsgicgi.launch(self) | 193 wsgicgi.launch(self) |
193 | 194 |
194 def __call__(self, env, respond): | 195 def __call__(self, env, respond): |