Fix for issue 14725 for 2.7 branch

This commit is contained in:
Richard Oudkerk 2012-05-05 20:41:08 +01:00
parent c642f67c63
commit 9a16fa69dd
3 changed files with 22 additions and 1 deletions

View file

@ -348,7 +348,10 @@ if sys.platform == 'win32':
try:
win32.ConnectNamedPipe(handle, win32.NULL)
except WindowsError, e:
if e.args[0] != win32.ERROR_PIPE_CONNECTED:
# ERROR_NO_DATA can occur if a client has already connected,
# written data and then disconnected -- see Issue 14725.
if e.args[0] not in (win32.ERROR_PIPE_CONNECTED,
win32.ERROR_NO_DATA):
raise
return _multiprocessing.PipeConnection(handle)