equal
deleted
inserted
replaced
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.''' |