def register_collector(collector):
 assert isinstance(collector, Collector), ('collector=%r' % (collector,))
 if (collector.name in COLLECTORS):
  col = COLLECTORS[collector.name]
  if (col.proc is not None):
   LOG.error('%s still has a process (pid=%d) and is being reset, terminating', col.name, col.proc.pid)
   col.shutdown()
 COLLECTORS[collector.name] = collector

def register_collector ( collector ) : assert isinstance ( collector , Collector ) , ( 'collector=%r' % ( collector , ) ) if ( collector . name in COLLECTORS ) : col = COLLECTORS [ collector . name ] if ( col . proc is not None ) : LOG . error ( '%s still has a process (pid=%d) and is being reset, terminating' , col . name , col . proc . pid ) col . shutdown ( ) COLLECTORS [ collector . name ] = collector
register a collector with the collectors global .