Saving sys.argv and sys.stderr is not needed anymore
authorVincent Wagelaar <vincent@ricardis.tudelft.nl>
Tue, 30 Aug 2005 18:23:39 +0200
changeset 1180 fe3eb1628c40
parent 1163 dacd3463ee3f
child 1181 4f5001f5b4c3
Saving sys.argv and sys.stderr is not needed anymore
mercurial/hgweb.py
--- a/mercurial/hgweb.py	Tue Aug 30 16:36:29 2005 +0200
+++ b/mercurial/hgweb.py	Tue Aug 30 18:23:39 2005 +0200
@@ -908,16 +908,9 @@
                     accept = accept + line[7:].split(',')
             env['HTTP_ACCEPT'] = ','.join(accept)
 
-            save = sys.argv, sys.stderr
-            try:
-                req = hgrequest(self.rfile, self.wfile, env)
-                sys.argv = ["hgweb.py"]
-                if '=' not in query:
-                    sys.argv.append(query)
-                self.send_response(200, "Script output follows")
-                hg.run(req)
-            finally:
-                sys.argv, sys.stderr = save
+            req = hgrequest(self.rfile, self.wfile, env)
+            self.send_response(200, "Script output follows")
+            hg.run(req)
 
     hg = hgweb(repo)
     if use_ipv6: