diff --git a/CHANGELOG b/CHANGELOG index f74cc7c..6430294 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ 0.6.0 - BREAKING CHANGE: wait_for_resource now requires the resource_id instead of the resource path + - BREAKING CHANGE: ckan installation is now mandatory - enh: cache calls to data.wait_for_resource 0.5.6 - maintenance release diff --git a/dcor_shared/ckan.py b/dcor_shared/ckan.py index 30d9006..30a14e7 100644 --- a/dcor_shared/ckan.py +++ b/dcor_shared/ckan.py @@ -1,10 +1,7 @@ import os import pathlib -try: - from ckan import common as ckan_common -except ImportError: - ckan_common = None +from ckan import common as ckan_common from .parse import get_ini_config_option @@ -16,7 +13,7 @@ def get_ckan_config_option(option): taken from there. Else, the configuration is taken from the configuration file returned by :func:`get_ckan_config_path`. """ - if ckan_common and ckan_common.config: + if ckan_common.config: # Get from current configuration (The `get` method in CKAN 2.10 # returns default values if not placeholder is specified) opt = ckan_common.config.get(option) diff --git a/dcor_shared/paths.py b/dcor_shared/paths.py index 2ca8305..68c15ae 100644 --- a/dcor_shared/paths.py +++ b/dcor_shared/paths.py @@ -6,10 +6,7 @@ from .parse import get_ini_config_option -try: - from ckan.common import config as ckan_config -except ImportError: - ckan_config = None +from ckan.common import config as ckan_config # noqa: F401 def get_dcor_depot_path():