Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 11416:caf10970950e
ui: ignore EIO in write_err
Hgs signal handler will catch the signal for example if the terminal hg is
running in is closed. That will make it try to warn that it was 'killed', but
that might fail with EIO and cause hg to exit with an unhandled exception.
Normally nobody cares, but system error handlers such as Fedoras abrt will
notice and report https://bugzilla.redhat.com/show_bug.cgi?id=596594 .
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 16 Jun 2010 00:22:10 +0200 |
parents | 22a737306ba5 |
children | 76454cbc11e4 |
comparison
equal
deleted
inserted
replaced
11415:a1e575b48563 | 11416:caf10970950e |
---|---|
367 # stderr may be buffered under win32 when redirected to files, | 367 # stderr may be buffered under win32 when redirected to files, |
368 # including stdout. | 368 # including stdout. |
369 if not getattr(sys.stderr, 'closed', False): | 369 if not getattr(sys.stderr, 'closed', False): |
370 sys.stderr.flush() | 370 sys.stderr.flush() |
371 except IOError, inst: | 371 except IOError, inst: |
372 if inst.errno != errno.EPIPE: | 372 if inst.errno not in (errno.EPIPE, errno.EIO): |
373 raise | 373 raise |
374 | 374 |
375 def flush(self): | 375 def flush(self): |
376 try: sys.stdout.flush() | 376 try: sys.stdout.flush() |
377 except: pass | 377 except: pass |