comparison mercurial/util.py @ 4129:e817c68edfed

stdout raises EINVAL when flush() is called on a closed pipe under win32. Maybe the exception should be caught and translated at raise location instead (sshserver.py).
author Patrick Mezard <pmezard@gmail.com>
date Mon, 19 Feb 2007 10:32:46 +0100
parents 587c6c652f82
children 9dc64c8414ca 6f9474044736 24c22a3f2ef8
comparison
equal deleted inserted replaced
4128:43d8f7466920 4129:e817c68edfed
739 return self.fp.write(s) 739 return self.fp.write(s)
740 except IOError, inst: 740 except IOError, inst:
741 if inst.errno != 0: raise 741 if inst.errno != 0: raise
742 self.close() 742 self.close()
743 raise IOError(errno.EPIPE, 'Broken pipe') 743 raise IOError(errno.EPIPE, 'Broken pipe')
744
745 def flush(self):
746 try:
747 return self.fp.flush()
748 except IOError, inst:
749 if inst.errno != errno.EINVAL: raise
750 self.close()
751 raise IOError(errno.EPIPE, 'Broken pipe')
744 752
745 sys.stdout = winstdout(sys.stdout) 753 sys.stdout = winstdout(sys.stdout)
746 754
747 def system_rcpath(): 755 def system_rcpath():
748 try: 756 try: