Skip to content

Commit

Permalink
Catch not found datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
Zharktas committed Feb 5, 2024
1 parent ab9f05d commit de91b69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckanext/matomo/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit de91b69

Please sign in to comment.