[diffoscope] 02/02: tests: iso9660: avoid overly-catching exception
Mattia Rizzolo
mattia at debian.org
Wed Aug 2 15:21:37 CEST 2017
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository diffoscope.
commit 9f868abed065094d98de507af64da0cc66e65d1b
Author: Mattia Rizzolo <mattia at debian.org>
Date: Wed Aug 2 15:21:11 2017 +0200
tests: iso9660: avoid overly-catching exception
If a try/except is needed it should be catch less
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
tests/comparators/test_iso9660.py | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/tests/comparators/test_iso9660.py b/tests/comparators/test_iso9660.py
index 269b9ec..eeaa2db 100644
--- a/tests/comparators/test_iso9660.py
+++ b/tests/comparators/test_iso9660.py
@@ -32,13 +32,10 @@ iso1 = load_fixture('test1.iso')
iso2 = load_fixture('test2.iso')
def is_cdrtools():
- try:
- if b"Schilling" in subprocess.check_output(['isoinfo', '--version']):
- return True
- else:
- return False
- except:
- return None
+ if b"Schilling" in subprocess.check_output(['isoinfo', '--version']):
+ return True
+ else:
+ return False
def test_identification(iso1):
assert isinstance(iso1, Iso9660File)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list