--- a/mercurial/hgweb/hgweb_mod.py Fri Jun 30 08:47:41 2006 -0700
+++ b/mercurial/hgweb/hgweb_mod.py Fri Jun 30 09:50:25 2006 -0700
@@ -651,12 +651,12 @@
return p
def run(self):
- if os.environ['GATEWAY_INTERFACE'][0:6] != "CGI/1.":
+ if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."):
raise RuntimeError("This function is only intended to be called while running as a CGI script.")
import mercurial.hgweb.wsgicgi as wsgicgi
from request import wsgiapplication
def make_web_app():
- return self.__class__(self.repo, self.reponame)
+ return self
wsgicgi.launch(wsgiapplication(make_web_app))
def run_wsgi(self, req):