--- pyinotify_.py 2009-03-05 17:20:23.000000000 +0530 +++ /tmp/pyinotify_.py 2009-04-21 17:55:08.000000000 +0530 @@ -37,17 +37,27 @@ import pyinotify except ImportError: raise MissingDependency('pyinotify') - + + ver = pyinotify.__version__ self.pyinotify = pyinotify - self.event_mask = ( - pyinotify.EventsCodes.IN_DELETE | - pyinotify.EventsCodes.IN_CREATE | - pyinotify.EventsCodes.IN_MOVED_FROM | - pyinotify.EventsCodes.IN_MOVED_TO | - pyinotify.EventsCodes.IN_MODIFY | - pyinotify.EventsCodes.IN_ATTRIB - ) - + if ver < "0.8.6": + self.event_mask = ( + pyinotify.EventsCodes.IN_DELETE | + pyinotify.EventsCodes.IN_CREATE | + pyinotify.EventsCodes.IN_MOVED_FROM | + pyinotify.EventsCodes.IN_MOVED_TO | + pyinotify.EventsCodes.IN_MODIFY | + pyinotify.EventsCodes.IN_ATTRIB + ) + else: + self.event_mask = ( + pyinotify.IN_DELETE | + pyinotify.IN_CREATE | + pyinotify.IN_MOVED_FROM | + pyinotify.IN_MOVED_TO | + pyinotify.IN_MODIFY | + pyinotify.IN_ATTRIB + ) self.lock = RLock() def start(self, debug = False):