cleanup: replace naked excepts with more specific ones
[ original upstream message ]
--- a/tests/hghave Sat May 12 16:00:53 2012 +0200
+++ b/tests/hghave Sat May 12 16:02:45 2012 +0200
@@ -60,7 +60,7 @@
os.close(fd)
os.remove(path)
return True
- except:
+ except (IOError, OSError):
return False
def has_executablebit():
@@ -93,7 +93,7 @@
try:
s2 = os.stat(p2)
return s2 == s1
- except:
+ except OSError:
return False
finally:
os.remove(path)
--- a/tests/run-tests.py Sat May 12 16:00:53 2012 +0200
+++ b/tests/run-tests.py Sat May 12 16:02:45 2012 +0200
@@ -860,7 +860,7 @@
tf = open(testpath)
firstline = tf.readline().rstrip()
tf.close()
- except:
+ except IOError:
firstline = ''
lctest = test.lower()