Package ganeti :: Module asyncnotifier :: Class SingleFileEventHandler
[hide private]
[frames] | no frames]

Class SingleFileEventHandler

source code


Handle modify events for a single file.

Instance Methods [hide private]
 
__init__(self, watch_manager, callback, filename)
Constructor for SingleFileEventHandler
source code
 
enable(self)
Watch the given file.
source code
 
disable(self)
Stop watching the given file.
source code
 
process_IN_IGNORED(self, event) source code
 
process_IN_MODIFY(self, event) source code

Inherited from FileEventHandlerBase: AddWatch, RemoveWatch, process_default

Inherited from pyinotify.ProcessEvent: __call__, my_init, nested_pevent, process_IN_Q_OVERFLOW

Inherited from pyinotify._ProcessEvent: __repr__

Class Variables [hide private]

Inherited from pyinotify.ProcessEvent: pevent

Instance Variables [hide private]

Inherited from FileEventHandlerBase: watch_manager

Method Details [hide private]

__init__(self, watch_manager, callback, filename)
(Constructor)

source code 

Constructor for SingleFileEventHandler

Parameters:
  • watch_manager (pyinotify.WatchManager) - inotify watch manager
  • callback (function accepting a boolean) - function to call when an inotify event happens
  • filename (string) - config file to watch
Overrides: pyinotify.ProcessEvent.__init__