diff --git a/ckan/ckanext/ckanext-ytp_main/ckanext/ytp/resourcestatusplugin.py b/ckan/ckanext/ckanext-ytp_main/ckanext/ytp/resourcestatusplugin.py index d05a6c7422..c3b821463f 100644 --- a/ckan/ckanext/ckanext-ytp_main/ckanext/ytp/resourcestatusplugin.py +++ b/ckan/ckanext/ckanext-ytp_main/ckanext/ytp/resourcestatusplugin.py @@ -1,6 +1,5 @@ -import json - import ckan.plugins as p +import yaml from ckan.plugins.toolkit import config from ckan.lib.plugins import DefaultTranslation import ckan.logic as logic @@ -82,9 +81,7 @@ def __init__(self, resource): driver_options = config.get('ckanext.cloudstorage.driver_options') if driver_options: - # driver options might not be valid json, even though its a dict - driver_options = driver_options.replace("'", '"') - driver_options = json.loads(driver_options) + driver_options = yaml.safe_load(driver_options) s3 = boto3.client('s3', aws_access_key_id=driver_options.get('key'), aws_secret_access_key=driver_options.get('secret'),