From 606dbf12b6bd3afe1154dadd5ae776a17b990aa4 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Tue, 31 Mar 2009 15:12:57 -0400 Subject: [PATCH] In TracZephyrPlugin: Change how line wrapping works. --- TracZephyrPlugin/ZephyrPlugin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TracZephyrPlugin/ZephyrPlugin.py b/TracZephyrPlugin/ZephyrPlugin.py index 320658e..791b6a3 100644 --- a/TracZephyrPlugin/ZephyrPlugin.py +++ b/TracZephyrPlugin/ZephyrPlugin.py @@ -14,12 +14,14 @@ class ZephyrPlugin(Component): '-c', zclass, '-i', 'trac-#%s' % id], stdin=subprocess.PIPE) - p.stdin.write("\n".join(textwrap.wrap(message)).encode('utf-8', 'replace')) + p.stdin.write(message.encode('utf-8', 'replace')) p.stdin.close() p.wait() def ticket_created(self, ticket): - message = "%s filed a new ticket:\n%s\n\n%s" % (ticket['reporter'], ticket['summary'], ticket['description'][:255]) + message = "%s filed a new ticket:\n%s\n\n%s" % (ticket['reporter'], + ticket['summary'], + textwrap.fill(ticket['description'][:255])) self.zwrite(ticket.id, message) def ticket_changed(self, ticket, comment, author, old_values): -- 2.45.0