mercurial/util.py
changeset 4134 9dc64c8414ca
parent 4098 c08b6af023bc
parent 4129 e817c68edfed
child 4195 b5d1eaade333
equal deleted inserted replaced
4126:b9dcee25be8e 4134:9dc64c8414ca
   788                 return self.fp.write(s)
   788                 return self.fp.write(s)
   789             except IOError, inst:
   789             except IOError, inst:
   790                 if inst.errno != 0: raise
   790                 if inst.errno != 0: raise
   791                 self.close()
   791                 self.close()
   792                 raise IOError(errno.EPIPE, 'Broken pipe')
   792                 raise IOError(errno.EPIPE, 'Broken pipe')
       
   793                 
       
   794         def flush(self):
       
   795             try:
       
   796                 return self.fp.flush()
       
   797             except IOError, inst:
       
   798                 if inst.errno != errno.EINVAL: raise
       
   799                 self.close()
       
   800                 raise IOError(errno.EPIPE, 'Broken pipe')
   793 
   801 
   794     sys.stdout = winstdout(sys.stdout)
   802     sys.stdout = winstdout(sys.stdout)
   795 
   803 
   796     def system_rcpath():
   804     def system_rcpath():
   797         try:
   805         try: