mercurial/ui.py
changeset 31963 1bfb9a63b98e
parent 31962 e9646ff34d55
child 32078 bf5e13e38390
--- a/mercurial/ui.py	Tue Apr 11 14:54:12 2017 -0700
+++ b/mercurial/ui.py	Tue Apr 11 14:54:12 2017 -0700
@@ -807,10 +807,15 @@
         # opencode timeblockedsection because this is a critical path
         starttime = util.timer()
         try:
-            try: self.fout.flush()
-            except (IOError, ValueError): pass
-            try: self.ferr.flush()
-            except (IOError, ValueError): pass
+            try:
+                self.fout.flush()
+            except IOError as err:
+                raise error.StdioError(err)
+            finally:
+                try:
+                    self.ferr.flush()
+                except IOError as err:
+                    raise error.StdioError(err)
         finally:
             self._blockedtimes['stdio_blocked'] += \
                 (util.timer() - starttime) * 1000