diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-12 00:54:14 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-12 00:54:14 (GMT) |
commit | 6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7 (patch) | |
tree | e731290ba41ff9208385bebbe402282ecbbd682f /Lib/multiprocessing | |
parent | 983b1434bda1819864fb5d82248f249358a4c22d (diff) | |
download | cpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.zip cpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.tar.gz cpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.tar.bz2 |
PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r-- | Lib/multiprocessing/connection.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py index 13d3d77..0c96958 100644 --- a/Lib/multiprocessing/connection.py +++ b/Lib/multiprocessing/connection.py @@ -321,7 +321,7 @@ if win32: firstchunk = overlapped.getbuffer() assert lenfirstchunk == len(firstchunk) except IOError as e: - if e.errno == win32.ERROR_BROKEN_PIPE: + if e.winerror == win32.ERROR_BROKEN_PIPE: raise EOFError raise buf.write(firstchunk) @@ -669,7 +669,7 @@ if sys.platform == 'win32': try: win32.ConnectNamedPipe(handle, win32.NULL) except WindowsError as e: - if e.args[0] != win32.ERROR_PIPE_CONNECTED: + if e.winerror != win32.ERROR_PIPE_CONNECTED: raise return PipeConnection(handle) @@ -692,8 +692,8 @@ if sys.platform == 'win32': 0, win32.NULL, win32.OPEN_EXISTING, 0, win32.NULL ) except WindowsError as e: - if e.args[0] not in (win32.ERROR_SEM_TIMEOUT, - win32.ERROR_PIPE_BUSY) or _check_timeout(t): + if e.winerror not in (win32.ERROR_SEM_TIMEOUT, + win32.ERROR_PIPE_BUSY) or _check_timeout(t): raise else: break |