# HG changeset patch # User Thomas Arendsen Hein # Date 1125471701 -7200 # Node ID 9d9f4973c76ad99a1e977eecc652559e12f53aef # Parent bc9695f1f872e906ec3af77785639d2aa90be05f Added missing 'import errno', and use errno for EPIPE, too. diff -r bc9695f1f872 -r 9d9f4973c76a mercurial/hgweb.py --- a/mercurial/hgweb.py Wed Aug 31 08:40:55 2005 +0200 +++ b/mercurial/hgweb.py Wed Aug 31 09:01:41 2005 +0200 @@ -6,7 +6,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -import os, cgi, time, re, socket, sys, zlib +import os, cgi, time, re, socket, sys, zlib, errno import mdiff from hg import * from ui import * @@ -77,8 +77,8 @@ self.out.write(thing) except TypeError: self.out.write(str(thing)) - except socket.error, x: - if x[0] != errno.ECONNRESET: + except socket.error, inst: + if inst[0] != errno.ECONNRESET: raise def header(self, headers=[('Content-type','text/html')]): @@ -869,7 +869,7 @@ try: self.do_hgweb() except socket.error, inst: - if inst.args[0] != 32: + if inst[0] != errno.EPIPE: raise def do_GET(self):