From 6c3fa8074f6547073b0646c6dc30ec35bd17bfb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 4 Nov 2024 16:02:18 +0100 Subject: [PATCH] fix: Avoid exception when the update scripts requires a new dependency Fix https://github.com/Lookyloo/lookyloo/issues/969 --- bin/update.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/update.py b/bin/update.py index 189938ca..96599ab0 100755 --- a/bin/update.py +++ b/bin/update.py @@ -10,7 +10,13 @@ import subprocess import sys from pathlib import Path -from lookyloo.default import get_homedir, get_config +try: + from lookyloo.default import get_homedir, get_config +except ImportError as e: + print(f'Unable to run the update script, it is probably due to a missing dependency: {e}') + print('Please run "poetry install" and try again.') + sys.exit() + logging.config.dictConfig(get_config('logging'))