def __init__(self, config_filename): self.config = SafeConfigParser() self.config.read(config_filename) self.config_fn = config_filename connection_settings = \ dict(self.config.items(self.CONNECTION_SETTINGS_SECTION)) Client.__init__(self, connection_settings)
def restart(self, connection_settings): # save configuration for key, value in connection_settings.iteritems(): self.config.set(CONNECTION_SETTINGS_SECTION, key, value) with open(self.config_fn, 'w') as fp: self.config.write(fp) Client.restart(self, connection_settings)
def __init__(self, connection_settings): Client.__init__(self, connection_settings) self.setup_routing_key()