Revision ac96953d

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

  
b/lib/asyncnotifier.py
153 153
    if self._watch_handle is not None:
154 154
      return
155 155

  
156
    # Class '...' has no 'IN_...' member, pylint: disable-msg=E1103
157
    mask = (pyinotify.EventsCodes.IN_MODIFY |
158
            pyinotify.EventsCodes.IN_IGNORED)
156
    # Different Pyinotify versions have the flag constants at different places,
157
    # hence not accessing them directly
158
    mask = (pyinotify.EventsCodes.ALL_FLAGS["IN_MODIFY"] |
159
            pyinotify.EventsCodes.ALL_FLAGS["IN_IGNORED"])
159 160

  
160 161
    self._watch_handle = self.AddWatch(self._filename, mask)
161 162

  

Also available in: Unified diff