Skip to content

Commit

Permalink
added safety for exix before log store full initialised
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Oct 11, 2022
1 parent 1fe32b7 commit 62f06d3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions spinn_utilities/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,14 @@ def process(self, msg, kwargs):
@classmethod
def atexit_handler(cls):

messages = []
if cls.__log_store:
messages = cls.__log_store.retreive_log_messages(
cls.__repeat_at_end)
else:
messages = []
try:
messages = cls.__log_store.retreive_log_messages(
cls.__repeat_at_end)
except Exception: # pylint: disable=broad-except
pass

messages.extend(cls._pop_not_stored_messages(cls.__repeat_at_end))
if messages:
level = logging.getLevelName(cls.__repeat_at_end)
Expand Down

0 comments on commit 62f06d3

Please sign in to comment.