From 20d2c045eb106470dc56f822ce7097b5be35e808 Mon Sep 17 00:00:00 2001 From: Alessandro Molina Date: Thu, 14 Mar 2024 23:17:36 +0100 Subject: [PATCH] Catch right time of exception on python 3.8 --- tg/util/files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tg/util/files.py b/tg/util/files.py index 1e3a70e1..ff4a0ccb 100644 --- a/tg/util/files.py +++ b/tg/util/files.py @@ -101,7 +101,7 @@ def get_dotted_filename(self, template_name, template_extension='.html'): with open(result, 'wb') as result_f: result_f.write(f.read_bytes()) - except ModuleNotFoundError as e: + except (ModuleNotFoundError, FileNotFoundError) as e: raise DottedFileLocatorError( "%s. Perhaps you have forgotten an __init__.py in that folder." % e )