Commits

Nikolaj Sjujskij committed ed8fab4

ino_watch: simplify waiting for events

  • Participants
  • Parent commits 068d4fc

Comments (0)

Files changed (1)

inotify_watcher.py

                                                              **action_kwargs)
     # run the first time
     action_lambda()
-    events = []
     while True:
+        events = inotifyx.get_events(watcher)
         if basename in (ev.name for ev in events):
             action_lambda()
-        events = inotifyx.get_events(watcher)
 
 
 def main():