# HG changeset patch # User mpm@selenic.com # Date 2005-08-27 08:55:10 # Node ID 3a1a46dcd3978a790f4c56486124880dbefeb1d4 # Parent 50a8acefb53d86de001325fc551fcb2241747697 hgweb: add catch for connection reset suggested by Jeff Sipek diff --git a/mercurial/hgweb.py b/mercurial/hgweb.py --- a/mercurial/hgweb.py +++ b/mercurial/hgweb.py @@ -73,7 +73,11 @@ def write(*things): 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={}):