Make it clear that get_last_modified should not raise an exception, but return None, if it cannot look up a file

This commit is contained in:
Dave Halter
2019-05-22 00:06:50 +02:00
parent 4b440159b1
commit de416b082e
2 changed files with 8 additions and 6 deletions

View File

@@ -82,9 +82,8 @@ def load_module(hashed_grammar, file_io, cache_path=None):
"""
Returns a module or None, if it fails.
"""
try:
p_time = file_io.get_last_modified()
except FileNotFoundError:
p_time = file_io.get_last_modified()
if p_time is None:
return None
try: