From 97722d5eb31bbaafd09296aa3bdb77e5ac666eb9 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 2 Nov 2012 13:53:29 -0400 Subject: [PATCH] zephyr_mirror: Don't let a single bad message break humbug=>zephyr forwarding. (imported from commit 9b20f5e9c661fe0850c119309f4fe6f2c5d40679) --- bots/zephyr_mirror.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bots/zephyr_mirror.py b/bots/zephyr_mirror.py index 71066b0..7e01098 100755 --- a/bots/zephyr_mirror.py +++ b/bots/zephyr_mirror.py @@ -392,7 +392,12 @@ def maybe_forward_to_zephyr(message): print "%s humbug=>zephyr: Alert! Out of order message: %s < %s" % \ (datetime.datetime.now(), message["timestamp"], timestamp_now) return - forward_to_zephyr(message) + try: + forward_to_zephyr(message) + except: + # Don't let an exception forwarding one message crash the + # whole process + traceback.print_exc() def humbug_to_zephyr(options): # Sync messages from zephyr to humbug