@@ -39,7 +39,7 @@ def wait(self, timeout):
39
39
os .read (self .PIPE [0 ], 1 )
40
40
return ret [0 ]
41
41
42
- except select . error as e :
42
+ except OSError as e :
43
43
if e .args [0 ] == errno .EINTR :
44
44
return self .sockets
45
45
if e .args [0 ] == errno .EBADF :
@@ -72,7 +72,7 @@ def run_for_one(self, timeout):
72
72
# process.
73
73
continue
74
74
75
- except EnvironmentError as e :
75
+ except OSError as e :
76
76
if e .errno not in (errno .EAGAIN , errno .ECONNABORTED ,
77
77
errno .EWOULDBLOCK ):
78
78
raise
@@ -101,7 +101,7 @@ def run_for_multiple(self, timeout):
101
101
102
102
try :
103
103
self .accept (listener )
104
- except EnvironmentError as e :
104
+ except OSError as e :
105
105
if e .errno not in (errno .EAGAIN , errno .ECONNABORTED ,
106
106
errno .EWOULDBLOCK ):
107
107
raise
@@ -143,7 +143,7 @@ def handle(self, listener, client, addr):
143
143
else :
144
144
self .log .debug ("Error processing SSL request." )
145
145
self .handle_error (req , client , addr , e )
146
- except EnvironmentError as e :
146
+ except OSError as e :
147
147
if e .errno not in (errno .EPIPE , errno .ECONNRESET , errno .ENOTCONN ):
148
148
self .log .exception ("Socket error processing request." )
149
149
else :
@@ -187,7 +187,7 @@ def handle_request(self, listener, req, client, addr):
187
187
self .log .access (resp , req , environ , request_time )
188
188
if hasattr (respiter , "close" ):
189
189
respiter .close ()
190
- except EnvironmentError :
190
+ except OSError :
191
191
# pass to next try-except level
192
192
util .reraise (* sys .exc_info ())
193
193
except Exception :
@@ -198,7 +198,7 @@ def handle_request(self, listener, req, client, addr):
198
198
try :
199
199
client .shutdown (socket .SHUT_RDWR )
200
200
client .close ()
201
- except EnvironmentError :
201
+ except OSError :
202
202
pass
203
203
raise StopIteration ()
204
204
raise
0 commit comments