From de91b693c904aa28af7f190989f87b558060d441 Mon Sep 17 00:00:00 2001 From: Jari Voutilainen Date: Mon, 5 Feb 2024 16:13:26 +0200 Subject: [PATCH] Catch not found datasets --- ckanext/matomo/commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ckanext/matomo/commands.py b/ckanext/matomo/commands.py index 49439b2..adc9a93 100644 --- a/ckanext/matomo/commands.py +++ b/ckanext/matomo/commands.py @@ -185,7 +185,11 @@ def fetch(dryrun, since, until, dataset): pkg = None if dataset: - pkg = package_show({'ignore_auth': True}, {'id': dataset}) + try: + pkg = package_show({'ignore_auth': True}, {'id': dataset}) + except toolkit.ObjectNotFound: + log.info("Given dataset: %s not found" % dataset) + pass # Resource datastore search sql events (API events) for date_str, date_statistics in datastore_search_sql_events.items():