Revision ac96953d daemons/ganeti-rapi
b/daemons/ganeti-rapi | ||
---|---|---|
253 | 253 |
self._cb = cb |
254 | 254 |
self._filename = os.path.basename(path) |
255 | 255 |
|
256 |
# Class '...' has no 'IN_...' member, pylint: disable-msg=E1103 |
|
257 |
mask = (pyinotify.EventsCodes.IN_CLOSE_WRITE | |
|
258 |
pyinotify.EventsCodes.IN_DELETE | |
|
259 |
pyinotify.EventsCodes.IN_MOVED_FROM | |
|
260 |
pyinotify.EventsCodes.IN_MOVED_TO) |
|
256 |
# Different Pyinotify versions have the flag constants at different places, |
|
257 |
# hence not accessing them directly |
|
258 |
mask = (pyinotify.EventsCodes.ALL_FLAGS["IN_CLOSE_WRITE"] | |
|
259 |
pyinotify.EventsCodes.ALL_FLAGS["IN_DELETE"] | |
|
260 |
pyinotify.EventsCodes.ALL_FLAGS["IN_MOVED_FROM"] | |
|
261 |
pyinotify.EventsCodes.ALL_FLAGS["IN_MOVED_TO"]) |
|
261 | 262 |
|
262 | 263 |
self._handle = self.AddWatch(os.path.dirname(path), mask) |
263 | 264 |
|
Also available in: Unified diff