mercurial/hgweb.py
changeset 1174 9d9f4973c76a
parent 1172 3f30a5e7e15b
child 1182 24d553b598e8
--- 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):