comparison mercurial/ui.py @ 31961:db823e38a61c

stdio: raise StdioError if something goes wrong in ui._write
author Bryan O'Sullivan <bryano@fb.com>
date Tue, 11 Apr 2017 14:54:12 -0700
parents de5c9d0e02ea
children e9646ff34d55
comparison
equal deleted inserted replaced
31960:71dcd4a4fa2f 31961:db823e38a61c
766 # opencode timeblockedsection because this is a critical path 766 # opencode timeblockedsection because this is a critical path
767 starttime = util.timer() 767 starttime = util.timer()
768 try: 768 try:
769 for a in msgs: 769 for a in msgs:
770 self.fout.write(a) 770 self.fout.write(a)
771 except IOError as err:
772 raise error.StdioError(err)
771 finally: 773 finally:
772 self._blockedtimes['stdio_blocked'] += \ 774 self._blockedtimes['stdio_blocked'] += \
773 (util.timer() - starttime) * 1000 775 (util.timer() - starttime) * 1000
774 776
775 def write_err(self, *args, **opts): 777 def write_err(self, *args, **opts):