diff mercurial/hgweb/hgweb_mod.py @ 5289:ed6df6b1c29a

Prevent WSGI apps from touching sys.stdin by setting ui.interactive to False.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Fri, 07 Sep 2007 17:38:52 +0200
parents ccdc8db02bdf
children 05889b6b1468 8ee5b8129e7b
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -65,7 +65,8 @@ def revnavgen(pos, pagelen, limit, nodef
 class hgweb(object):
     def __init__(self, repo, name=None):
         if type(repo) == type(""):
-            self.repo = hg.repository(ui.ui(report_untrusted=False), repo)
+            parentui = ui.ui(report_untrusted=False, interactive=False)
+            self.repo = hg.repository(parentui, repo)
         else:
             self.repo = repo