Skip to content

Commit

Permalink
ignore more errors when trying to set hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
rsalmei committed Nov 8, 2023
1 parent 492ea3b commit 966583c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alive_progress/core/hook_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def get_all_loggers():
def set_hook(h):
try:
return h.setStream(get_hook_for(h))
except AttributeError:
pass # ignores errors and return None
except Exception: # captures AttributeError, AssertionError, and anything else,
pass # then returns None, effectively leaving that handler alone, unchanged.

# account for reused handlers within loggers.
handlers = set(h for logger in get_all_loggers()
Expand Down

0 comments on commit 966583c

Please sign in to comment.