From e9f734599664d20ba6b83f2ce7263cc7ab7fa62c Mon Sep 17 00:00:00 2001 From: Arjan Draisma Date: Mon, 15 Jul 2024 12:55:52 +0200 Subject: [PATCH] use specific exception --- src/nplinker/genomics/bigscape/runbigscape.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nplinker/genomics/bigscape/runbigscape.py b/src/nplinker/genomics/bigscape/runbigscape.py index bc17bd65..ee63e9a0 100644 --- a/src/nplinker/genomics/bigscape/runbigscape.py +++ b/src/nplinker/genomics/bigscape/runbigscape.py @@ -50,12 +50,12 @@ def run_bigscape( try: subprocess.run([bigscape_py_path, "-h"], capture_output=True, check=True) except Exception as e: - raise Exception( + raise FileNotFoundError( f"Failed to find/run bigscape.py (path={bigscape_py_path}, err={e})" ) from e if not os.path.exists(antismash_path): - raise Exception(f'antismash_path "{antismash_path}" does not exist!') + raise FileNotFoundError(f'antismash_path "{antismash_path}" does not exist!') logger.info(f"Running BiG-SCAPE version {version}")