[Buildbot-commits] buildbot/buildbot/steps shell.py,1.12,1.13

Brian Warner warner at users.sourceforge.net
Thu Mar 20 23:56:51 UTC 2008


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

Modified Files:
	shell.py 
Log Message:
[project @ #115:Refactor-WithProperties.render-to-use-_BuildProper.patch]
Patch by Greg Ward <gerg.ward+buildbot at gmail.com>:
Refactor WithProperties.render() to use _BuildPropertyMapping more
intelligently.

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

Index: shell.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- shell.py	20 Mar 2008 23:56:45 -0000	1.12
+++ shell.py	20 Mar 2008 23:56:49 -0000	1.13
@@ -27,16 +27,14 @@
         self.args = args
 
     def render(self, build):
+        pmap = _BuildPropertyMapping(build)
         if self.args:
             strings = []
             for name in self.args:
-                p = build.getProperty(name)
-                if p is None:
-                    p = ""
-                strings.append(p)
+                strings.append(pmap[name])
             s = self.fmtstring % tuple(strings)
         else:
-            s = self.fmtstring % _BuildPropertyMapping(build)
+            s = self.fmtstring % pmap
         return s
 
 def render(s, build):





More information about the Commits mailing list