Skip to content

Commit

Permalink
bug: Bot: stop Bot on deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
wagner-intevation committed May 10, 2023
1 parent d15026e commit 0c443d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions intelmq/lib/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,9 @@ def __sleep(self, remaining: Optional[float] = None, log: bool = True):
self.__handle_sighup()
remaining = self.rate_limit - (time.time() - starttime)

def __del__(self):
return self.stop(exitcode=0)

def stop(self, exitcode: int = 1):
if not self.logger:
print('Could not initialize logger, only logging to stdout.')
Expand Down

0 comments on commit 0c443d0

Please sign in to comment.