changeset 1174:9d9f4973c76a

Added missing 'import errno', and use errno for EPIPE, too.
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 31 Aug 2005 09:01:41 +0200
parents bc9695f1f872
children ba4ce38b90a3
files mercurial/hgweb.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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):