From: Thorsten Date: Thu, 4 Oct 2018 20:04:43 +0000 (+0200) Subject: don't spam about spam if you wouldn't have spammed at all X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=b5ecc3adcae821140ae5a89ec021d8cceaf08998;p=urlbot-v3.git don't spam about spam if you wouldn't have spammed at all --- diff --git a/distbot/bot/action_worker.py b/distbot/bot/action_worker.py index 3248f7f..1cb4ce1 100644 --- a/distbot/bot/action_worker.py +++ b/distbot/bot/action_worker.py @@ -113,7 +113,8 @@ class ActionThread(threading.Thread): else: self.schedule_action(action.event) except RuntimeError as e: - action.msg = "Warning: {}\nOriginal message: {}".format(e, action.msg) + if action.msg: + action.msg = "Warning: {}\nOriginal message: {}".format(e, action.msg) # indirect execution if action.command: