From 0c2174525e68769b738b4c93c6ea0eea0da8afb4 Mon Sep 17 00:00:00 2001 From: infeeeee Date: Thu, 30 Mar 2023 02:54:53 +0200 Subject: [PATCH] Fix FileNotFound not catched --- dyn2py/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyn2py/__init__.py b/dyn2py/__init__.py index 681dde9..bf7bc8c 100644 --- a/dyn2py/__init__.py +++ b/dyn2py/__init__.py @@ -199,7 +199,10 @@ def run(options: Options) -> None: elif f.is_python_file(): logging.debug("Source is a Python file") - f.update_dynamo(options) + try: + f.update_dynamo(options) + except FileNotFoundError: + logging.error(f"Source Dynamo file not found! {f.filepath}") # Write files at the end: for f in DynamoFile.open_files | PythonFile.open_files: