def __init__(self, **kwargs): SingletonConfigurable.__init__(self, **kwargs) # Add my class to self.classes so my attributes appear in command line # options. self.classes.insert(0, self.__class__) self.init_logging()
def __init__(self, **kwargs): SingletonConfigurable.__init__(self, **kwargs) # Ensure my class is in self.classes, so my attributes appear in command line # options and config files. if self.__class__ not in self.classes: self.classes.insert(0, self.__class__) self.init_logging()
def __init__(self, **kwargs): SingletonConfigurable.__init__(self, **kwargs) # Add my class to self.classes so my attributes appear in command line # options. self.classes.insert(0, self.__class__) # ensure self.flags dict is valid for key,value in self.flags.iteritems(): assert len(value) == 2, "Bad flag: %r:%s"%(key,value) assert isinstance(value[0], (dict, Config)), "Bad flag: %r:%s"%(key,value) assert isinstance(value[1], basestring), "Bad flag: %r:%s"%(key,value) self.init_logging()
def _config_changed(self, name, old, new): SingletonConfigurable._config_changed(self, name, old, new) self.log.debug('Config changed:') self.log.debug(repr(new))
def _config_changed(self, name, old, new): SingletonConfigurable._config_changed(self, name, old, new)