From c80e68a12fa990be1566b0e9337206c57f4bb774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Mercader?= Date: Tue, 14 Jun 2011 15:59:13 +0100 Subject: [PATCH] Ensure the correct configuration is used on each stage --- ckanext/harvest/harvesters/ckanharvester.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ckanext/harvest/harvesters/ckanharvester.py b/ckanext/harvest/harvesters/ckanharvester.py index 6a973d6..9c5a877 100644 --- a/ckanext/harvest/harvesters/ckanharvester.py +++ b/ckanext/harvest/harvesters/ckanharvester.py @@ -70,8 +70,7 @@ class CKANHarvester(HarvesterBase): get_all_packages = True package_ids = [] - if not self.config: - self._set_config(harvest_job.source.config) + self._set_config(harvest_job.source.config) # Check if this source has been harvested before previous_job = Session.query(HarvestJob) \ @@ -157,8 +156,7 @@ class CKANHarvester(HarvesterBase): def fetch_stage(self,harvest_object): log.debug('In CKANHarvester fetch_stage') - if not self.config: - self._set_config(harvest_object.job.source.config) + self._set_config(harvest_object.job.source.config) # Get source URL url = harvest_object.source.url.rstrip('/') @@ -188,8 +186,7 @@ class CKANHarvester(HarvesterBase): harvest_object, 'Import') return False - if not self.config: - self._set_config(harvest_object.job.source.config) + self._set_config(harvest_object.job.source.config) try: package_dict = json.loads(harvest_object.content)