stdio: raise StdioError if something goes wrong in ui._write
authorBryan O'Sullivan <bryano@fb.com>
Tue, 11 Apr 2017 14:54:12 -0700
changeset 31961 db823e38a61c
parent 31960 71dcd4a4fa2f
child 31962 e9646ff34d55
stdio: raise StdioError if something goes wrong in ui._write
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
@@ -768,6 +768,8 @@
         try:
             for a in msgs:
                 self.fout.write(a)
+        except IOError as err:
+            raise error.StdioError(err)
         finally:
             self._blockedtimes['stdio_blocked'] += \
                 (util.timer() - starttime) * 1000