comparison mercurial/ui.py @ 16703:7292a4618f46

cleanup: replace more naked excepts with more specific ones
author Brodie Rao <brodie@sf.io>
date Sun, 13 May 2012 13:17:31 +0200
parents 525fdb738975
children 2d432a1fc0db
comparison
equal deleted inserted replaced
16702:1751d96d324f 16703:7292a4618f46
486 if inst.errno not in (errno.EPIPE, errno.EIO, errno.EBADF): 486 if inst.errno not in (errno.EPIPE, errno.EIO, errno.EBADF):
487 raise 487 raise
488 488
489 def flush(self): 489 def flush(self):
490 try: self.fout.flush() 490 try: self.fout.flush()
491 except: pass 491 except (IOError, ValueError): pass
492 try: self.ferr.flush() 492 try: self.ferr.flush()
493 except: pass 493 except (IOError, ValueError): pass
494 494
495 def interactive(self): 495 def interactive(self):
496 '''is interactive input allowed? 496 '''is interactive input allowed?
497 497
498 An interactive session is a session where input can be reasonably read 498 An interactive session is a session where input can be reasonably read