The "apparently pylint was right" commit.
Although the pyinotify constants work on old distributions, they fail on
new ones, with new python. Fixing this by calling them in a way that
works everywhere.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
# no need to call the parent's constructor
self.watch_manager = watch_manager
self.callback = callback
- # pylint: disable-msg=E1103
- # pylint for some reason doesn't see the below constants
- self.mask = pyinotify.EventsCodes.IN_IGNORED | \
- pyinotify.EventsCodes.IN_MODIFY
+ self.mask = pyinotify.EventsCodes.ALL_FLAGS["IN_IGNORED"] | \
+ pyinotify.EventsCodes.ALL_FLAGS["IN_MODIFY"]
self.file = filename
self.watch_handle = None