mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
windows: do not close stdout on flush() failure
It's been there since 84af5a079c7d (2007-02-19), but seems wrong since any I/O operations to a closed file would raise ValueError, not IOError. We should keep the file object open even if the underlying file descriptor is half dead.
This commit is contained in:
parent
2a6bbffb41
commit
74b8d80dfc
@ -180,7 +180,6 @@ class winstdout(object):
|
||||
except IOError as inst:
|
||||
if inst.errno != errno.EINVAL:
|
||||
raise
|
||||
self.close()
|
||||
raise IOError(errno.EPIPE, 'Broken pipe')
|
||||
|
||||
def _is_win_9x():
|
||||
|
Loading…
Reference in New Issue
Block a user