From 63e54f2d14e26c6ca9e6efce0e718708c98e11b5 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 10 Feb 2025 21:33:41 +0100 Subject: [PATCH] Improve ModuleNotFoundError message. --- src/run.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/run.py b/src/run.py index abd1709..c7fdad8 100755 --- a/src/run.py +++ b/src/run.py @@ -1,19 +1,18 @@ #!/usr/bin/env python3 """Viewer and editor for ledger .dat files.""" -# included libs +# standard libs from datetime import date as dt_date from decimal import Decimal, InvalidOperation as DecimalInvalidOperation from os import environ from pathlib import Path from sys import exit as sys_exit from typing import Any, Optional, Self -# might need module installation(s) +# non-standard libs try: from plomlib.web import PlomHttpHandler, PlomHttpServer, PlomQueryMap except ModuleNotFoundError as e: - print('FAIL: Missing module(s), please run with "install_deps" argument.') - print(e) + print(f"Missing dependency: {e}. Please run with 'install_deps' argument.") sys_exit(1) -- 2.30.2