# HG changeset patch # User Bryan O'Sullivan # Date 1491947652 25200 # Node ID e9646ff34d55d4dd2a2fab8110091adb004df0e7 # Parent db823e38a61cdd81738cc61438612f01e2b64489 stdio: raise StdioError if something goes wrong in ui._write_err The prior code used to ignore certain classes of error, which was not the right thing to do. diff -r db823e38a61c -r e9646ff34d55 mercurial/ui.py --- a/mercurial/ui.py Tue Apr 11 14:54:12 2017 -0700 +++ b/mercurial/ui.py Tue Apr 11 14:54:12 2017 -0700 @@ -801,8 +801,7 @@ if not getattr(self.ferr, 'closed', False): self.ferr.flush() except IOError as inst: - if inst.errno not in (errno.EPIPE, errno.EIO, errno.EBADF): - raise + raise error.StdioError(inst) def flush(self): # opencode timeblockedsection because this is a critical path