Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
taleinat committed Jun 6, 2022
1 parent e933df8 commit d05bf7d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/watchdog/tricks/__init__.py
Expand Up @@ -156,9 +156,8 @@ def on_any_event(self, event):
else:
process_watcher = ProcessWatcher(self.process, None)
self._process_watchers.add(process_watcher)
def cleanup():
self._process_watchers.discard(process_watcher)
process_watcher.process_termination_callback = cleanup
process_watcher.process_termination_callback = \
functools.partial(self._process_watchers.discard, process_watcher)
process_watcher.start()

def is_process_running(self):
Expand Down

0 comments on commit d05bf7d

Please sign in to comment.