Skip to content

Commit

Permalink
tries an alternative solution
Browse files Browse the repository at this point in the history
i.e., don't send events if stopped
  • Loading branch information
ivg committed Aug 10, 2023
1 parent bf1e269 commit f8c9cb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/watchdog/tricks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ def _stop_process(self):
try:
if self.process_watcher is not None:
self.process_watcher.stop()
self.process_watcher.join()
self.process_watcher = None

if self.process is not None:
Expand Down
3 changes: 2 additions & 1 deletion src/watchdog/utils/process_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def run(self):
return

try:
self.process_termination_callback()
if not self.stopped_event.is_set():
self.process_termination_callback()
except Exception:
logger.exception("Error calling process termination callback")

0 comments on commit f8c9cb0

Please sign in to comment.