Fix another windows issue

This commit is contained in:
Dave Halter
2018-03-23 01:21:07 +01:00
parent 106573f20d
commit b5bc25fc0b

View File

@@ -189,7 +189,9 @@ class _CompiledSubprocess(object):
pickle_dump(data, self._process.stdin)
except (socket.error, IOError) as e:
# Once Python2 will be removed we can just use `BrokenPipeError`.
if e.errno != errno.EPIPE:
# Also, somehow in windows it returns EINVAL instead of EPIPE if
# the subprocess dies.
if e.errno not in (errno.EPIPE, errno.EINVAL):
# Not a broken pipe
raise
self.kill()