Several small utilities are available at the top-level buildbot.util
package. As always, see the API documentation for more information.
natualSortwinslave1, winslave2, ..
formatIntervalComparableMixin 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.
safeTranslateLRUCacheget and
add methods, and can also be accessed via dictionary syntax
(lru['id']).