changeset 1087:3a1a46dcd397

hgweb: add catch for connection reset suggested by Jeff Sipek
author mpm@selenic.com
date Sat, 27 Aug 2005 01:55:10 -0700
parents 50a8acefb53d
children 39b916b1d8e4 a906b018eaef
files mercurial/hgweb.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb.py	Sat Aug 27 01:50:18 2005 -0700
+++ b/mercurial/hgweb.py	Sat Aug 27 01:55:10 2005 -0700
@@ -73,7 +73,11 @@
             for part in thing:
                 write(part)
         else:
-            sys.stdout.write(str(thing))
+            try:
+                sys.stdout.write(str(thing))
+            except socket.error, x:
+                if x[0] != errno.ECONNRESET:
+                    raise
 
 class templater:
     def __init__(self, mapfile, filters={}, defaults={}):