TracZephyrPlugin: Allow setting an opcode on outgoing zephyrs.
authorEvan Broder <broder@mit.edu>
Mon, 26 Apr 2010 19:24:57 +0000 (15:24 -0400)
committerEvan Broder <broder@mit.edu>
Mon, 26 Apr 2010 19:24:57 +0000 (15:24 -0400)
TracZephyrPlugin/ZephyrPlugin.py

index 88b9ec219c7d57e3d696f716953483819e829288..aeaec986f583dc3c9347892a966b34e33f4c4d0b 100644 (file)
@@ -19,6 +19,9 @@ class ZephyrPlugin(Component):
         command = shlex.split(self.config.get('ZephyrPlugin', 'command').encode('utf-8'))
         if not command:
             command = ['zwrite', '-q', '-l', '-d']
+        opcode = self.config.get('ZephyrPlugin', 'opcode')
+        if opcode:
+            command += ['-O', opcode]
         p = subprocess.Popen(command +
                              ['-c', zclass,
                               '-i', 'trac-#%s' % id],