File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ def accept(self):
321321 conn , addr = self .socket .accept ()
322322 return conn , addr
323323 except socket .error as why :
324- if why [0 ] == EWOULDBLOCK :
324+ if why . args [0 ] == EWOULDBLOCK :
325325 pass
326326 else :
327327 raise
@@ -331,7 +331,7 @@ def send(self, data):
331331 result = self .socket .send (data )
332332 return result
333333 except socket .error as why :
334- if why [0 ] == EWOULDBLOCK :
334+ if why . args [0 ] == EWOULDBLOCK :
335335 return 0
336336 else :
337337 raise
@@ -349,7 +349,7 @@ def recv(self, buffer_size):
349349 return data
350350 except socket .error as why :
351351 # winsock sometimes throws ENOTCONN
352- if why [0 ] in [ECONNRESET , ENOTCONN , ESHUTDOWN ]:
352+ if why . args [0 ] in [ECONNRESET , ENOTCONN , ESHUTDOWN ]:
353353 self .handle_close ()
354354 return b''
355355 else :
You can’t perform that action at this time.
0 commit comments