Skip to content

Commit

Permalink
Add logger to all calls of run_with_inturrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
Aflynn50 committed Mar 22, 2024
1 parent 671a936 commit d13bc8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion juju/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,8 @@ async def _watcher(stop_event):
try:
results = await utils.run_with_interrupt(
watcher.Next(),
stop_event)
stop_event,
log=log)
except JujuAPIError as e:
if 'watcher was stopped' not in str(e):
raise
Expand Down
3 changes: 2 additions & 1 deletion juju/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,8 @@ async def _all_watcher():
try:
results = await utils.run_with_interrupt(
allwatcher.Next(),
self._watch_stopping)
self._watch_stopping,
log=log)
except JujuAPIError as e:
if 'watcher was stopped' not in str(e):
raise
Expand Down

0 comments on commit d13bc8e

Please sign in to comment.