def getName(obj):
 def sanitize(name):
  return name.replace('.', '/')
 if isinstance(obj, _BuildStepFactory):
  klass = obj.factory
 else:
  klass = type(obj)
 name = ''
 klasses = ((klass,) + inspect.getmro(klass))
 for klass in klasses:
  if (hasattr(klass, '__module__') and klass.__module__.startswith('buildbot.')):
   return sanitize((((name + klass.__module__) + '.') + klass.__name__))
  else:
   name += '>'
 return sanitize(type(obj).__name__)

def getName ( obj ) : def sanitize ( name ) : return name . replace ( '.' , '/' ) if isinstance ( obj , _BuildStepFactory ) : klass = obj . factory else : klass = type ( obj ) name = '' klasses = ( ( klass , ) + inspect . getmro ( klass ) ) for klass in klasses : if ( hasattr ( klass , '__module__' ) and klass . __module__ . startswith ( 'buildbot.' ) ) : return sanitize ( ( ( ( name + klass . __module__ ) + '.' ) + klass . __name__ ) ) else : name += '>' return sanitize ( type ( obj ) . __name__ )
this method finds the first parent class which is within the buildbot namespace it prepends the name with as many ">" as the class is subclassed .