Use ContentFetchError instead of generic Exception
This commit is contained in:
parent
935b9dda01
commit
b978c26e70
|
@ -177,7 +177,7 @@ class CKANHarvester(HarvesterBase):
|
||||||
url = base_rest_url + '/revision/%s' % revision_id
|
url = base_rest_url + '/revision/%s' % revision_id
|
||||||
try:
|
try:
|
||||||
content = self._get_content(url)
|
content = self._get_content(url)
|
||||||
except Exception,e:
|
except ContentFetchError,e:
|
||||||
self._save_gather_error('Unable to get content for URL: %s: %s' % (url, str(e)),harvest_job)
|
self._save_gather_error('Unable to get content for URL: %s: %s' % (url, str(e)),harvest_job)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ class CKANHarvester(HarvesterBase):
|
||||||
url = base_rest_url + '/package'
|
url = base_rest_url + '/package'
|
||||||
try:
|
try:
|
||||||
content = self._get_content(url)
|
content = self._get_content(url)
|
||||||
except Exception,e:
|
except ContentFetchError,e:
|
||||||
self._save_gather_error('Unable to get content for URL: %s: %s' % (url, str(e)),harvest_job)
|
self._save_gather_error('Unable to get content for URL: %s: %s' % (url, str(e)),harvest_job)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ class CKANHarvester(HarvesterBase):
|
||||||
# Get contents
|
# Get contents
|
||||||
try:
|
try:
|
||||||
content = self._get_content(url)
|
content = self._get_content(url)
|
||||||
except Exception,e:
|
except ContentFetchError,e:
|
||||||
self._save_object_error('Unable to get content for package: %s: %r' % \
|
self._save_object_error('Unable to get content for package: %s: %r' % \
|
||||||
(url, e),harvest_object)
|
(url, e),harvest_object)
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue