TracZephyrPlugin: Split command using shlex to allow multiword arguments.
authorAnders Kaseorg <andersk@mit.edu>
Tue, 30 Jun 2009 20:24:59 +0000 (16:24 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Tue, 30 Jun 2009 20:24:59 +0000 (16:24 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
TracZephyrPlugin/ZephyrPlugin.py

index f011a8b3f0662082c7e917c88b89d738d6e21f0b..5546bda0955c260c91382d3d873d9f67be5a0260 100644 (file)
@@ -2,6 +2,7 @@ from trac.core import *
 from trac.ticket import ITicketChangeListener
 import subprocess
 import textwrap
+import shlex
 
 class ZephyrPlugin(Component):
     implements(ITicketChangeListener)
@@ -10,7 +11,7 @@ class ZephyrPlugin(Component):
         zclass = self.config.get('ZephyrPlugin', 'class')
         if zclass == '':
             return
-        command = self.config.get('ZephyrPlugin', 'command').split(' ')
+        command = shlex.split(self.config.get('ZephyrPlugin', 'command'))
         if not command:
             command = ['zwrite', '-q', '-l', '-d']
         p = subprocess.Popen(command +