From 76eabff10d418722508833032fb736536d81b39f Mon Sep 17 00:00:00 2001 From: "Jalees A. Nasir" Date: Wed, 12 Jun 2024 20:59:06 +0000 Subject: [PATCH] update exceptions for frontend checking --- scripts/assign_lineages.py | 2 +- signalexe.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/assign_lineages.py b/scripts/assign_lineages.py index ebb20e9..6bd1100 100755 --- a/scripts/assign_lineages.py +++ b/scripts/assign_lineages.py @@ -25,7 +25,7 @@ def check_frontend(): try: subprocess.check_call(['mamba', 'list'], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT) return 'mamba' - except subprocess.CalledProcessError: + except (subprocess.CalledProcessError, FileNotFoundError): return 'conda' def update_latest_pangolin(): diff --git a/signalexe.py b/signalexe.py index d3fdca9..f713ddd 100755 --- a/signalexe.py +++ b/signalexe.py @@ -68,7 +68,7 @@ def check_frontend(): try: subprocess.check_call(['mamba', 'list'], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT) return 'mamba' - except subprocess.CalledProcessError: + except (subprocess.CalledProcessError, FileNotFoundError): return 'conda' def check_directory(path: str) -> Path: