--- 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?
--- a/mercurial/util.py Sun May 13 13:17:27 2012 +0200
+++ b/mercurial/util.py Sun May 13 13:17:31 2012 +0200
@@ -762,7 +762,7 @@
ofp.close()
except:
try: os.unlink(temp)
- except: pass
+ except OSError: pass
raise
return temp
--- a/tests/tinyproxy.py Sun May 13 13:17:27 2012 +0200
+++ b/tests/tinyproxy.py Sun May 13 13:17:31 2012 +0200
@@ -47,7 +47,7 @@
try: soc.connect(host_port)
except socket.error, arg:
try: msg = arg[1]
- except: msg = arg
+ except (IndexError, TypeError): msg = arg
self.send_error(404, msg)
return 0
return 1