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 )