Skip to content

Commit

Permalink
[inotify] Prevent raising an exception when a file in a monitored fol…
Browse files Browse the repository at this point in the history
…der has no permissions (#669, fixes #670)
  • Loading branch information
andfoy committed Jun 21, 2020
1 parent 37bcf6c commit 4e5768b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/watchdog/observers/inotify_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ def _raise_error():
raise OSError(errno.ENOSPC, "inotify watch limit reached")
elif err == errno.EMFILE:
raise OSError(errno.EMFILE, "inotify instance limit reached")
elif err == errno.EACCES:
# Prevent raising an exception when a file with no permissions
# changes
pass
else:
raise OSError(err, os.strerror(err))

Expand Down

0 comments on commit 4e5768b

Please sign in to comment.