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 89edabd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/watchdog/tricks/__init__.py
Expand Up @@ -156,9 +156,7 @@ 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 89edabd

Please sign in to comment.