]> 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 791b6a35a2603bb7d87e366088d8a20154fe9a1c..f011a8b3f0662082c7e917c88b89d738d6e21f0b 100644 (file)
@@ -10,8 +10,11 @@ class ZephyrPlugin(Component):
         zclass = self.config.get('ZephyrPlugin', 'class')
         if zclass == '':
             return
-        p = subprocess.Popen(['zwrite', '-q', '-l', '-d',
-                              '-c', zclass,
+        command = self.config.get('ZephyrPlugin', 'command').split(' ')
+        if not command:
+            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'))