From 27d597d686d388a9d01a7db80b77cec38576901c Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 21 Nov 2012 08:08:46 -0500 Subject: [PATCH] zephyr_mirror: Don't break long words/urls when mirroring. (imported from commit df2b6a6969fc54016eeee4996df317e2843844c8) --- bots/zephyr_mirror_backend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 9a3be58..fef4eca 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -371,7 +371,8 @@ def forward_to_zephyr(message): logger.error("Error computing zsig for %s!" % (message["sender_email"],)) return - wrapped_content = "\n".join("\n".join(textwrap.wrap(line)) + wrapper = textwrap.TextWrapper(break_long_words=False) + wrapped_content = "\n".join("\n".join(wrapper.wrap(line)) for line in message["content"].split("\n")) logger.info("Forwarding message from %s" % (message["sender_email"],))