diff 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
line wrap: on
line diff
--- 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?