]> sipb.mit.edu Git - snippets/.git/blobdiff - TracZephyrPlugin/ZephyrPlugin.py
TracZephyrPlugin: Be more flexible in the custom zwrite command
[snippets/.git] / 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'))