comparison mercurial/ui.py @ 31962:e9646ff34d55

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.
author Bryan O'Sullivan <bryano@fb.com>
date Tue, 11 Apr 2017 14:54:12 -0700
parents db823e38a61c
children 1bfb9a63b98e
comparison
equal deleted inserted replaced
31961:db823e38a61c 31962:e9646ff34d55
799 # stderr may be buffered under win32 when redirected to files, 799 # stderr may be buffered under win32 when redirected to files,
800 # including stdout. 800 # including stdout.
801 if not getattr(self.ferr, 'closed', False): 801 if not getattr(self.ferr, 'closed', False):
802 self.ferr.flush() 802 self.ferr.flush()
803 except IOError as inst: 803 except IOError as inst:
804 if inst.errno not in (errno.EPIPE, errno.EIO, errno.EBADF): 804 raise error.StdioError(inst)
805 raise
806 805
807 def flush(self): 806 def flush(self):
808 # opencode timeblockedsection because this is a critical path 807 # opencode timeblockedsection because this is a critical path
809 starttime = util.timer() 808 starttime = util.timer()
810 try: 809 try: