Skip to content

Commit

Permalink
Catch right time of exception on python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Mar 14, 2024
1 parent c8dee22 commit 20d2c04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tg/util/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 20d2c04

Please sign in to comment.