mercurial/hgweb/hgwebdir_mod.py
changeset 30636 f1c9fafcbf46
parent 30559 d83ca854fa21
child 30749 e38e7ea21987
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):