Several small utilities are available at the top-level buildbot.util
package. As always, see the API documentation for more information.
natualSort
winslave1
, winslave2
, ..
formatInterval
ComparableMixin
class Widget(FactoryProduct, ComparableMixin): compare_attrs = [ 'radius', 'thickness' ] # ...
Any attributes not in compare_attrs
will not be considered when
comparing objects. This is particularly useful in implementing buildbot's
reconfig logic, where a simple comparison between the new and existing objects
can determine whether the new object should replace the existing object.
safeTranslate
LRUCache
get
and
add
methods, and can also be accessed via dictionary syntax
(lru['id']
).