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 20def09 commit 11cba69
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 11cba69

Please sign in to comment.