def __init__(self, config, queue_name=None, routing_key=None): if not 'ckan.api_key' in config: log.warn("No CKAN API key has been specified") base_location = self.base_location if 'ckan.site_url' in config: base_location = urljoin(config.get('ckan.site_url'), "api") CkanClient.__init__(self, base_location=base_location, api_key=config.get('ckan.api_key')) Consumer.__init__(self, config, queue_name=queue_name, routing_key=routing_key)