diff options
Diffstat (limited to 'python2/examples/tutorial_threadednotifier.py')
-rw-r--r-- | python2/examples/tutorial_threadednotifier.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python2/examples/tutorial_threadednotifier.py b/python2/examples/tutorial_threadednotifier.py index 6fbb4cd..f1eb6c8 100644 --- a/python2/examples/tutorial_threadednotifier.py +++ b/python2/examples/tutorial_threadednotifier.py @@ -7,7 +7,7 @@ import pyinotify wm = pyinotify.WatchManager() # Watch Manager mask = pyinotify.IN_DELETE | pyinotify.IN_CREATE # watched events -class HandleEvents(pyinotify.ProcessEvent): +class EventHandler(pyinotify.ProcessEvent): def process_IN_CREATE(self, event): print "Creating:", event.pathname @@ -16,7 +16,7 @@ class HandleEvents(pyinotify.ProcessEvent): #log.setLevel(10) -notifier = pyinotify.ThreadedNotifier(wm, HandleEvents()) +notifier = pyinotify.ThreadedNotifier(wm, EventHandler()) notifier.start() wdd = wm.add_watch('/tmp', mask, rec=True) |