mercurial/windows.py
changeset 38601 af8d8513d7de
parent 38483 3efadf2317c7
parent 38533 3a0f322af192
child 38627 93ed193bc03e
equal deleted inserted replaced
38600:a936d1368fc5 38601:af8d8513d7de
   171             while start < l:
   171             while start < l:
   172                 end = start + limit
   172                 end = start + limit
   173                 self.fp.write(s[start:end])
   173                 self.fp.write(s[start:end])
   174                 start = end
   174                 start = end
   175         except IOError as inst:
   175         except IOError as inst:
   176             if inst.errno != 0:
   176             if inst.errno != 0 and not win32.lasterrorwaspipeerror(inst):
   177                 raise
   177                 raise
   178             self.close()
   178             self.close()
   179             raise IOError(errno.EPIPE, 'Broken pipe')
   179             raise IOError(errno.EPIPE, 'Broken pipe')
   180 
   180 
   181     def flush(self):
   181     def flush(self):
   182         try:
   182         try:
   183             return self.fp.flush()
   183             return self.fp.flush()
   184         except IOError as inst:
   184         except IOError as inst:
   185             if inst.errno != errno.EINVAL:
   185             if not win32.lasterrorwaspipeerror(inst):
   186                 raise
   186                 raise
   187             raise IOError(errno.EPIPE, 'Broken pipe')
   187             raise IOError(errno.EPIPE, 'Broken pipe')
   188 
   188 
   189 def _is_win_9x():
   189 def _is_win_9x():
   190     '''return true if run on windows 95, 98 or me.'''
   190     '''return true if run on windows 95, 98 or me.'''