diff -r d60678a567a9 -r 328739ea70c3 mercurial/hgweb/request.py --- a/mercurial/hgweb/request.py Tue Jun 23 22:38:21 2015 -0700 +++ b/mercurial/hgweb/request.py Tue Jun 23 22:20:08 2015 -0700 @@ -111,7 +111,7 @@ if thing: try: self.server_write(thing) - except socket.error, inst: + except socket.error as inst: if inst[0] != errno.ECONNRESET: raise