From 369f5e9d800a72153f2b3f4c02b4185b6f107d5d Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 26 Nov 2012 14:51:36 -0500 Subject: [PATCH] zephyr_mirror: Don't use @(@color(blue)) in zsigs. (imported from commit e4b594e3c22c25fa4f87baaad09227396bb92a0d) --- api/bots/zephyr_mirror_backend.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/api/bots/zephyr_mirror_backend.py b/api/bots/zephyr_mirror_backend.py index 06cb5fe73f..49715303e9 100755 --- a/api/bots/zephyr_mirror_backend.py +++ b/api/bots/zephyr_mirror_backend.py @@ -237,7 +237,7 @@ def process_notice(notice, log): # skip PING messages return - if zsig.endswith("@(@color(blue))") or notice.format.endswith("@(@color(blue))"): + if notice.format.endswith("@(@color(blue))"): logger.debug("Skipping message we got from Humbug!") return @@ -387,16 +387,11 @@ def send_unauthed_zephyr(zwrite_args, content): return send_zephyr(zwrite_args + ["-d"], content) def forward_to_zephyr(message): - zsig = u"%s@(@color(blue))" % (zsig_fullname,) - if ' dot ' in zsig: - logger.error("Error computing zsig for %s!" % (message["sender_email"],)) - return - wrapper = textwrap.TextWrapper(break_long_words=False) wrapped_content = "\n".join("\n".join(wrapper.wrap(line)) for line in message["content"].split("\n")) - zwrite_args = ["zwrite", "-s", zsig, "-F", "Class $class, Instance $instance:\n" + + zwrite_args = ["zwrite", "-s", zsig_fullname, "-F", "Class $class, Instance $instance:\n" + "To: @bold($recipient) at $time $date\n" + "From: @bold{$1 <$sender>}\n\n$2@(@color(blue))"] logger.info("Forwarding message from %s" % (message["sender_email"],))