Turns out we don't care about IN_CREATE either

This commit is contained in:
Jean-Paul Calderone 2019-01-29 10:14:00 -05:00
parent c57a70dbec
commit 2cfa88265b
2 changed files with 1 additions and 11 deletions

View File

@ -141,17 +141,6 @@ class INotifyTests(unittest.TestCase):
test_movedTo.skip = True
def test_create(self):
"""
Creating a file in a monitored directory sends an
C{inotify.IN_CREATE} event to the callback.
"""
def operation(path):
path.open("w").close()
return self._notificationTest(inotify.IN_CREATE, operation)
test_create.skip = True
def test_delete(self):
"""
Deleting a file in a monitored directory sends an

View File

@ -74,6 +74,7 @@ class INotifyEventHandler(FileSystemEventHandler):
event_mask = event_mask | IN_CLOSE_WRITE
event_mask = event_mask | IN_MODIFY
if isinstance(event, (DirCreatedEvent, FileCreatedEvent)):
# For our purposes, IN_CREATE is irrelevant.
event_mask = event_mask | IN_CLOSE_WRITE
if isinstance(event, (DirDeletedEvent, FileDeletedEvent)):
event_mask = event_mask | IN_DELETE