]> snippets.scripts.mit.edu Git - Scripts/git/.git/commitdiff
TracZephyrPlugin: Be more flexible in the custom zwrite command
authorGeoffrey Thomas <geofft@mit.edu>
Mon, 29 Jun 2009 15:51:14 +0000 (11:51 -0400)
committerGeoffrey Thomas <geofft@mit.edu>
Mon, 29 Jun 2009 15:51:14 +0000 (11:51 -0400)
Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
TracZephyrPlugin/ZephyrPlugin.py

index ad9186582125f96d693ca119e12715bc3203f358..f011a8b3f0662082c7e917c88b89d738d6e21f0b 100644 (file)
@@ -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'))