[diffoscope] 04/07: Drop unused try_except in tests/conftest.

Chris Lamb chris at chris-lamb.co.uk
Mon Aug 15 21:55:54 CEST 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit efb15046b0acbdbc5a5bb67214ec65e4456cb47b
Author: Chris Lamb <lamby at debian.org>
Date:   Mon Aug 15 20:17:43 2016 +0100

    Drop unused try_except in tests/conftest.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 tests/comparators/conftest.py | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/tests/comparators/conftest.py b/tests/comparators/conftest.py
index 33465dc..8b083ad 100644
--- a/tests/comparators/conftest.py
+++ b/tests/comparators/conftest.py
@@ -46,11 +46,3 @@ def tool_older_than(cmdline, min_ver, vcls=StrictVersion):
         return True
     actual_ver = subprocess.check_output(cmdline).decode("utf-8").strip()
     return vcls(actual_ver) < vcls(min_ver)
-
-
-# from Jerry Kindall at http://stackoverflow.com/a/7088133
-def try_except(success, failure, *exceptions):
-    try:
-        return success()
-    except exceptions or Exception:
-        return failure() if callable(failure) else failure

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list