Skip to content

Commit

Permalink
bot debugger: workaround for systemexit of bot
Browse files Browse the repository at this point in the history
  • Loading branch information
wagner-intevation committed May 15, 2023
1 parent 8853cb3 commit c3314f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions intelmq/lib/bot_debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,8 @@ def messageWizzard(self, msg):
def pprint(msg) -> str:
""" We can't use standard pprint as JSON standard asks for double quotes. """
return json.dumps(msg, indent=4, sort_keys=True)

def __del__(self):
# prevents a SystemExit Exception at object deletion
# remove once PR#2358 (library mode) is merged
setattr(self.instance, 'testing', True)

0 comments on commit c3314f8

Please sign in to comment.