Package buildbot :: Package util
[frames] | no frames]

Package util

source code

Submodules

Classes
  SerializedInvocation
A method wrapper to serialize calls to a deferred method.
  ComparableMixin
Specify a list of attributes that are 'important'.
Functions
 
deferredLocked(lock_or_attr)
Wrap a function which returns a Deferred with a DeferredLock.
source code
 
naturalSort(l)
Returns a sorted copy of l, so that numbers in strings are sorted in the proper order.
source code
 
now(_reactor=None)
Get the time, using reactor.seconds or time.time
source code
 
formatInterval(eta) source code
 
safeTranslate(str) source code
 
none_or_str(x)
Cast X to a str if it is not None
source code
Variables
  NotABranch = NotABranch
  UTC = UTC()
Function Details

deferredLocked(lock_or_attr)

source code 

Wrap a function which returns a Deferred with a DeferredLock. The DeferredLock is given by the argument to the decorator; if this argument is a string, then the function is assumed to be a method, and the named attribute of SELF is used as the lock object.

naturalSort(l)

source code 

Returns a sorted copy of l, so that numbers in strings are sorted in the proper order.

e.g. ['foo10', 'foo1', 'foo2'] will be sorted as ['foo1', 'foo2', 'foo10'] instead of the default ['foo1', 'foo10', 'foo2']