Skip to content

Commit

Permalink
Handle NotADirectoryError in include_exists()
Browse files Browse the repository at this point in the history
A recent commit removed this favor of `IsADirectoryError`. In fact both
exceptions need to be handled.
  • Loading branch information
seanh committed Jan 21, 2025
1 parent ad405b6 commit 078f54a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _shared/local_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def include_exists(self, context, path):
try:
with self._open(context, path):
return True
except (FileNotFoundError, IsADirectoryError):
except (FileNotFoundError, IsADirectoryError, NotADirectoryError):
return False

@pass_context
Expand Down

0 comments on commit 078f54a

Please sign in to comment.