[Buildbot-commits] buildbot/buildbot/process properties.py, 1.4, 1.5

Brian Warner warner at users.sourceforge.net
Thu May 22 22:13:19 UTC 2008


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

Modified Files:
	properties.py 
Log Message:
[project @ #124:schedulers-provide-properties.patch]
Make the scheduler classes actually provide properties to the buildsets
they submit.  Triggerable schedulers also do a nice job of configurably
propagating properties from the triggering build.

Original author: dustin at v.igoro.us
Date: 2008-04-13 18:42:31+00:00

Index: properties.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/properties.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- properties.py	22 May 2008 22:13:11 -0000	1.4
+++ properties.py	22 May 2008 22:13:17 -0000	1.5
@@ -3,7 +3,7 @@
 from twisted.python import log
 from twisted.python.failure import Failure
 
-class Properties:
+class Properties(util.ComparableMixin):
     """
     I represent a set of properties that can be interpolated into various
     strings in buildsteps.
@@ -18,6 +18,9 @@
     As a special case, a property value of None is returned as an empty 
     string when used as a mapping.
     """
+
+    compare_attrs = ('properties')
+
     def __init__(self, **kwargs):
         """
         @param kwargs: initial property values (for testing)
@@ -36,7 +39,7 @@
 
     def getProperty(self, name, default=None):
         """Get the value for the given property, with no None -> '' special case"""
-        return self.properties.get(name, default)[0]
+        return self.properties.get(name, (default,))[0]
 
     def getPropertySource(self, name):
         return self.properties[name][1]





More information about the Commits mailing list