Adjust spoolwatchers use of inotify to correspond to pyinotify 0.8.9
authorDiane Trout <diane@caltech.edu>
Fri, 24 Sep 2010 22:34:17 +0000 (22:34 +0000)
committerDiane Trout <diane@caltech.edu>
Fri, 24 Sep 2010 22:34:17 +0000 (22:34 +0000)
htsworkflow/automation/spoolwatcher.py

index b3a449f7a64bfbc7fab8708315f88359de3aaade..93efe27f96a94478f9262ca0f7d2fb6724911165 100644 (file)
@@ -11,6 +11,8 @@ from htsworkflow.util import mount
 # this uses pyinotify
 import pyinotify
 from pyinotify import EventsCodes
+IN_CREATE = EventsCodes.ALL_FLAGS['IN_CREATE']
+IN_UNMOUNT = EventsCodes.ALL_FLAGS['IN_UNMOUNT']
 
 from benderjab import rpc
 
@@ -223,7 +225,7 @@ class SpoolWatcher(rpc.XmlRpcBot):
         if watchdirs is None:
             watchdirs = self.watchdirs
 
-        mask = EventsCodes.IN_CREATE | EventsCodes.IN_UNMOUNT
+        mask = IN_CREATE | IN_UNMOUNT
         # rec traverses the tree and adds all the directories that are there
         # at the start.
         # auto_add will add in new directories as they are created