From 795808e7cc90bf7b3992169aa4c9b14beac923e8 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 2 Nov 2012 10:49:01 -0400 Subject: [PATCH] zephyr_mirror: Support the empty string in blue as our loop detection technique. (imported from commit 4f9c77df7479bfa485dac381514ee2c591ce09ef) --- api/bots/zephyr_mirror.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/bots/zephyr_mirror.py b/api/bots/zephyr_mirror.py index 649a2a47ff..895ca9db66 100755 --- a/api/bots/zephyr_mirror.py +++ b/api/bots/zephyr_mirror.py @@ -214,8 +214,12 @@ def process_notice(notice, log): return if isinstance(zsig, str): - # Check for width unicode character u'\u200B'.encode("utf-8") - if u'\u200B'.encode("utf-8") in zsig: + # Check the loop suppression method of having a zsig ending + # with the empty string rendered in blue + # + # Check for the old loop suppression mechanism of a width + # unicode character u'\u200B'.encode("utf-8"). + if u'\u200B'.encode("utf-8") in zsig or zsig.endswith("@(@color(blue))"): print "%s: zephyr=>humbug: Skipping message from Humbug!" % \ (datetime.datetime.now()) return