Merge "Catch NotADirectoryError error"

This commit is contained in:
Zuul 2023-04-11 11:28:03 +00:00 committed by Gerrit Code Review
commit cff1cb4334
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ def _get_mtime(name):
s = os.stat(name)
return s.st_mtime
except OSError as err:
if err.errno != errno.ENOENT:
if err.errno not in {errno.ENOENT, errno.ENOTDIR}:
raise
return -1.0