##// END OF EJS Templates
Added missing 'import errno', and use errno for EPIPE, too.
Thomas Arendsen Hein -
r1174:9d9f4973 default
parent child Browse files
Show More
@@ -6,7 +6,7 b''
6 # This software may be used and distributed according to the terms
6 # This software may be used and distributed according to the terms
7 # of the GNU General Public License, incorporated herein by reference.
7 # of the GNU General Public License, incorporated herein by reference.
8
8
9 import os, cgi, time, re, socket, sys, zlib
9 import os, cgi, time, re, socket, sys, zlib, errno
10 import mdiff
10 import mdiff
11 from hg import *
11 from hg import *
12 from ui import *
12 from ui import *
@@ -77,8 +77,8 b' class hgrequest:'
77 self.out.write(thing)
77 self.out.write(thing)
78 except TypeError:
78 except TypeError:
79 self.out.write(str(thing))
79 self.out.write(str(thing))
80 except socket.error, x:
80 except socket.error, inst:
81 if x[0] != errno.ECONNRESET:
81 if inst[0] != errno.ECONNRESET:
82 raise
82 raise
83
83
84 def header(self, headers=[('Content-type','text/html')]):
84 def header(self, headers=[('Content-type','text/html')]):
@@ -869,7 +869,7 b' def create_server(repo):'
869 try:
869 try:
870 self.do_hgweb()
870 self.do_hgweb()
871 except socket.error, inst:
871 except socket.error, inst:
872 if inst.args[0] != 32:
872 if inst[0] != errno.EPIPE:
873 raise
873 raise
874
874
875 def do_GET(self):
875 def do_GET(self):
General Comments 0
You need to be logged in to leave comments. Login now