From 168e8c98e58d1245516bbc19e6fc7f4758dec051 Mon Sep 17 00:00:00 2001 From: Flavien Solt Date: Fri, 10 Nov 2023 15:08:33 +0100 Subject: [PATCH] cli: [fix] clarify import error message (#77) --- revizor.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/revizor.py b/revizor.py index 5f09c5f..b3d6bfc 100755 --- a/revizor.py +++ b/revizor.py @@ -6,7 +6,15 @@ Copyright (C) Microsoft Corporation SPDX-License-Identifier: MIT """ -from src.cli import main +try: + from src.cli import main +except ImportError as orig_import_error: + try: + from revizor.cli import main + except ImportError: + print("Unable to import main from src.cli.") + print(f"Issue during import of src.cli: `{orig_import_error}`") + exit(1) if __name__ == '__main__':