Skip to content

Commit

Permalink
BREAKING CHANGE: ckan installation is now mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Jan 23, 2024
1 parent 893f6a6 commit 4df0801
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 2 additions & 5 deletions dcor_shared/ckan.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions dcor_shared/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 4df0801

Please sign in to comment.