From 6b6b690091f882097af129edd759bbb1a4b9d5b5 Mon Sep 17 00:00:00 2001 From: Josef Haupt Date: Mon, 2 Dec 2024 16:51:37 +0100 Subject: [PATCH] try-catch around ASCII bird (#521) --- birdnet_analyzer/analyze.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/birdnet_analyzer/analyze.py b/birdnet_analyzer/analyze.py index b6671996..de2f037d 100644 --- a/birdnet_analyzer/analyze.py +++ b/birdnet_analyzer/analyze.py @@ -678,8 +678,11 @@ def __call__(self, parser, args, values, option_string=None): args = parser.parse_args() - if os.get_terminal_size().columns >= 64: - print(ASCII_LOGO, flush=True) + try: + if os.get_terminal_size().columns >= 64: + print(ASCII_LOGO, flush=True) + except Exception: + pass # Set paths relative to script path (requested in #3) cfg.MODEL_PATH = os.path.join(SCRIPT_DIR, cfg.MODEL_PATH)