forked from VimPlug/jedi
Properly raise broken pipe exception
This commit is contained in:
@@ -490,7 +490,7 @@ def pickle_dump(data, file):
|
|||||||
# Python on Windows don't throw EPIPE errors for pipes. So reraise them with
|
# Python on Windows don't throw EPIPE errors for pipes. So reraise them with
|
||||||
# the correct type and error number.
|
# the correct type and error number.
|
||||||
except OSError:
|
except OSError:
|
||||||
raise IOError(errno.EPIPE)
|
raise IOError(errno.EPIPE, "Broken pipe")
|
||||||
else:
|
else:
|
||||||
pickle.dump(data, file, protocol=_PICKLE_PROTOCOL)
|
pickle.dump(data, file, protocol=_PICKLE_PROTOCOL)
|
||||||
file.flush()
|
file.flush()
|
||||||
|
|||||||
Reference in New Issue
Block a user