Cosmetics.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
184a716a14
commit
cd0b360912
|
@ -90,10 +90,14 @@ class DropUploader(service.MultiService):
|
|||
# We don't watch for IN_CREATE, because that would cause us to read and upload a
|
||||
# possibly-incomplete file before the application has closed it. There should always
|
||||
# be an IN_CLOSE_WRITE after an IN_CREATE (I think).
|
||||
# TODO: what about IN_MOVE_SELF or IN_UNMOUNT?
|
||||
#self.mask = inotify.IN_CLOSE_WRITE | inotify.IN_MOVED_TO | inotify.IN_ONLYDIR
|
||||
#self.mask = inotify.IN_CLOSE_WRITE | inotify.IN_MOVED_TO | inotify.IN_MOVED_FROM | inotify.IN_ONLYDIR | IN_EXCL_UNLINK
|
||||
self.mask = inotify.IN_CLOSE_WRITE | inotify.IN_MOVED_TO | inotify.IN_ONLYDIR | IN_EXCL_UNLINK | inotify.IN_DELETE
|
||||
# TODO: what about IN_MOVE_SELF, IN_MOVED_FROM, or IN_UNMOUNT?
|
||||
#
|
||||
self.mask = ( inotify.IN_CLOSE_WRITE
|
||||
| inotify.IN_MOVED_TO
|
||||
| inotify.IN_DELETE
|
||||
| inotify.IN_ONLYDIR
|
||||
| IN_EXCL_UNLINK
|
||||
)
|
||||
self._notifier.watch(self._local_path, mask=self.mask, callbacks=[self._notify],
|
||||
recursive=True)
|
||||
|
||||
|
|
Loading…
Reference in New Issue