[PATCH 7 of 9] stdio: raise StdioError if something goes wrong in ui._write_err
Bryan O'Sullivan
bos at serpentine.com
Mon Apr 10 14:51:37 EDT 2017
# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1490915085 25200
# Thu Mar 30 16:04:45 2017 -0700
# Node ID fdac23ea683f6b2b76885e3aafb9a6bdb53218ab
# Parent 5134460363aeaac3c50f982c611a113344923155
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 --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -798,8 +798,7 @@ class ui(object):
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
+ error.raisestdio(inst)
def flush(self):
# opencode timeblockedsection because this is a critical path
More information about the Mercurial-devel
mailing list