1. John Paulett
  2. hg-stable-custom

Commits

John Paulett  committed 70b9699

Patched ui.py to allow deployment on mod_wsgi.

  • Participants
  • Parent commits 07a6281
  • Branches default

Comments (0)

Files changed (1)

File mercurial/ui.py

View file
             # stderr may be buffered under win32 when redirected to files,
             # including stdout.
             if not sys.stderr.closed: sys.stderr.flush()
+        ## Patched for mod_wsgi deployment, according to:
+        ## http://jimmyg.org/blog/2008/mercurial-hosting-with-mod_wsgi.html
+        #except IOError, inst:
+        #    if inst.errno != errno.EPIPE:
+        #        raise
         except IOError, inst:
-            if inst.errno != errno.EPIPE:
+            if not (inst.errno == errno.EPIPE or "access restricted by mod_wsgi" in str(inst)):
                 raise
 
+
+
     def flush(self):
         try: sys.stdout.flush()
         except: pass