[Buildbot-commits] buildbot/buildbot/steps shell.py,1.14,1.15

Brian Warner warner at users.sourceforge.net
Thu Mar 20 23:57:00 UTC 2008


Update of /cvsroot/buildbot/buildbot/buildbot/steps
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15876/buildbot/steps

Modified Files:
	shell.py 
Log Message:
[project @ #115:Modify-ShellCommand.describe-to-use-WithProperties.patch]
patch by Greg Ward <gerg.ward+buildbot at gmail.com>:
Modify ShellCommand.describe() to use WithProperties via render().

Original author: dustin at v.igoro.us
Date: 2008-03-13 03:25:04+00:00

Index: shell.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- shell.py	20 Mar 2008 23:56:54 -0000	1.14
+++ shell.py	20 Mar 2008 23:56:58 -0000	1.15
@@ -39,9 +39,9 @@
       - a command= parameter to my constructor (overrides .command)
       - set explicitly with my .setCommand() method (overrides both)
 
-    @ivar command: a list of argv strings (or WithProperties instances).
-                   This will be used by start() to create a
-                   RemoteShellCommand instance.
+    @ivar command: a list of renderable objects (typically strings or
+                   WithProperties instances). This will be used by start()
+                   to create a RemoteShellCommand instance.
 
     @ivar logfiles: a dict mapping log NAMEs to workdir-relative FILENAMEs
                     of their corresponding logfiles. The contents of the file
@@ -130,9 +130,12 @@
         if self.description is not None:
             return self.description
 
-        words = self._interpolateProperties(self.command)
+        words = self.command
+        # TODO: handle WithProperties here
         if isinstance(words, types.StringTypes):
             words = words.split()
+        # render() each word to handle WithProperties objects
+        words = [render(word, self.build) for word in words]
         if len(words) < 1:
             return ["???"]
         if len(words) == 1:





More information about the Commits mailing list