]> git.aero2k.de Git - urlbot-v3.git/commitdiff
don't spam about spam if you wouldn't have spammed at all
authorThorsten <mail@aero2k.de>
Thu, 4 Oct 2018 20:04:43 +0000 (22:04 +0200)
committerThorsten <mail@aero2k.de>
Thu, 4 Oct 2018 20:04:43 +0000 (22:04 +0200)
distbot/bot/action_worker.py

index 3248f7fe0b36d36034c2a5be54d796b0ae065156..1cb4ce1b5b7e39d6d218a207aa4dc05815af059c 100644 (file)
@@ -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: