def __init__(self, config): LoggingConfigurable.__init__(self) if not isinstance(config, dict): raise Exception("A dictionary typed config is expected") if not config: raise Exception("A non-zero sized dictionary is expected") self.config = Config(config)
def __init__(self, config): LoggingConfigurable.__init__(self) if not isinstance(config, dict): raise Exception("A dictionary typed config is expected") if not config: raise Exception("A non-zero sized dictionary is expected") # Ensure that we don't change the passed in config, # But only use it. Deep is allowed if it is of type Config self.config = copy.deepcopy(Config(config))
def __init__(self, **kwargs): LoggingConfigurable.__init__(self, **kwargs); opts = copy(self.storage_options); opts.update({ "log": self.log }); self.log.debug("Create instance of '%s' with options '%s'" % (self.storage_class, json.dumps(self.storage_options))) # Create the storage object self.__storage = create_instance(self.storage_class, opts);