From: Geoffrey Thomas Date: Mon, 29 Jun 2009 15:51:14 +0000 (-0400) Subject: TracZephyrPlugin: Be more flexible in the custom zwrite command X-Git-Url: https://snippets.scripts.mit.edu/gitweb.cgi/Scripts/git/.git/commitdiff_plain/d23d10bace6fbba07e1574bd3db7c487925a78b8 TracZephyrPlugin: Be more flexible in the custom zwrite command Signed-off-by: Geoffrey Thomas --- diff --git a/TracZephyrPlugin/ZephyrPlugin.py b/TracZephyrPlugin/ZephyrPlugin.py index ad91865..f011a8b 100644 --- a/TracZephyrPlugin/ZephyrPlugin.py +++ b/TracZephyrPlugin/ZephyrPlugin.py @@ -10,11 +10,11 @@ class ZephyrPlugin(Component): zclass = self.config.get('ZephyrPlugin', 'class') if zclass == '': return - command = self.config.get('ZephyrPlugin', 'command') + command = self.config.get('ZephyrPlugin', 'command').split(' ') if not command: - command = 'zwrite' - p = subprocess.Popen([command, '-q', '-l', '-d', - '-c', zclass, + command = ['zwrite', '-q', '-l', '-d'] + p = subprocess.Popen(command + + ['-c', zclass, '-i', 'trac-#%s' % id], stdin=subprocess.PIPE) p.stdin.write(message.encode('utf-8', 'replace'))