Reflow text to 79 char width. Warning not necessary with an exception I think.

This commit is contained in:
David Read 2015-11-13 12:32:13 +00:00
parent 0ce3748153
commit 1288a4d9e7
1 changed files with 8 additions and 9 deletions

View File

@ -11,13 +11,13 @@ def harvest_source_patch(context, data_dict):
''' '''
Patch an existing harvest source Patch an existing harvest source
This method just proxies the request to package_patch, This method just proxies the request to package_patch, which will update a
which will update a harvest_source dataset type and the harvest_source dataset type and the HarvestSource object. All auth checks
HarvestSource object. All auth checks and validation will and validation will be done there. We only make sure to set the dataset
be done there. We only make sure to set the dataset type. type.
Note that the harvest source type (ckan, waf, csw, etc) Note that the harvest source type (ckan, waf, csw, etc) is now set via the
is now set via the source_type field. source_type field.
All fields that are not provided, will be stay as they were before. All fields that are not provided, will be stay as they were before.
@ -55,8 +55,7 @@ def harvest_source_patch(context, data_dict):
try: try:
source = get_action('package_patch')(context, data_dict) source = get_action('package_patch')(context, data_dict)
except KeyError: except KeyError:
log.warn('This CKAN instance does not support package_patch, consider upgrading to CKAN >= 2.3 if needed.') raise Exception('The harvest_source_patch action is not available on '
raise Exception('The harvest_source_patch action is not available on this version of CKAN') 'this version of CKAN')
return source return source