diff -r 1751d96d324f -r 7292a4618f46 mercurial/ui.py --- a/mercurial/ui.py Sun May 13 13:17:27 2012 +0200 +++ b/mercurial/ui.py Sun May 13 13:17:31 2012 +0200 @@ -488,9 +488,9 @@ def flush(self): try: self.fout.flush() - except: pass + except (IOError, ValueError): pass try: self.ferr.flush() - except: pass + except (IOError, ValueError): pass def interactive(self): '''is interactive input allowed?