1313@instance_checking_exception (OSError )
1414def BlockingOSError (inst ):
1515 """I/O operation would block."""
16- errnos = { errno .EAGAIN , errno .EALREADY , errno .EWOULDBLOCK ,
17- errno .EINPROGRESS }
16+ errnos = [ errno .EAGAIN , errno .EALREADY , errno .EWOULDBLOCK ,
17+ errno .EINPROGRESS ]
1818 return hasattr (inst , 'errno' ) and inst .errno in errnos
1919
2020
2121@instance_checking_exception (OSError )
2222def BrokenPipeError (inst ):
2323 """Broken pipe."""
24- errnos = { errno .EPIPE , errno .ESHUTDOWN }
24+ errnos = [ errno .EPIPE , errno .ESHUTDOWN ]
2525 return hasattr (inst , 'errno' ) and inst .errno in errnos
2626
2727
@@ -34,8 +34,8 @@ def ChildProcessError(inst):
3434@instance_checking_exception (OSError )
3535def ConnectionError (inst ):
3636 """Connection error."""
37- errnos = { errno .EPIPE , errno .ESHUTDOWN , errno .ECONNABORTED ,
38- errno .ECONNREFUSED , errno .ECONNRESET }
37+ errnos = [ errno .EPIPE , errno .ESHUTDOWN , errno .ECONNABORTED ,
38+ errno .ECONNREFUSED , errno .ECONNRESET ]
3939 return hasattr (inst , 'errno' ) and inst .errno in errnos
4040
4141
0 commit comments