comparison mercurial/hgweb.py @ 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 33f40d0c6124
children 0cb9c72b6c03
comparison
equal deleted inserted replaced
1086:50a8acefb53d 1087:3a1a46dcd397
71 for thing in things: 71 for thing in things:
72 if hasattr(thing, "__iter__"): 72 if hasattr(thing, "__iter__"):
73 for part in thing: 73 for part in thing:
74 write(part) 74 write(part)
75 else: 75 else:
76 sys.stdout.write(str(thing)) 76 try:
77 sys.stdout.write(str(thing))
78 except socket.error, x:
79 if x[0] != errno.ECONNRESET:
80 raise
77 81
78 class templater: 82 class templater:
79 def __init__(self, mapfile, filters={}, defaults={}): 83 def __init__(self, mapfile, filters={}, defaults={}):
80 self.cache = {} 84 self.cache = {}
81 self.map = {} 85 self.map = {}