diff -r 44378796c5e5 -r 348352658e4b mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py Sun Dec 09 16:49:55 2018 +0100 +++ b/mercurial/hgweb/server.py Sun Dec 09 19:40:54 2018 -0500 @@ -94,7 +94,7 @@ try: self.do_hgweb() except socket.error as inst: - if inst[0] != errno.EPIPE: + if inst.errno != errno.EPIPE: raise def do_POST(self):