From e2b2ee2a006deacfaf5df09c5a4ee8a7b02d81ca Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Tue, 20 Jun 2023 21:41:00 -0700 Subject: [PATCH] Fix output of update --dry-run --- intake/cli.py | 2 +- intake/source.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/intake/cli.py b/intake/cli.py index 1db04e1..e89e2aa 100644 --- a/intake/cli.py +++ b/intake/cli.py @@ -125,7 +125,7 @@ def cmd_update(cmd_args): update_items(source, items) else: for item in items: - print("Item:", item) + print("Item:", item._item) except InvalidConfigException as ex: print("Could not fetch", args.source) print(ex) diff --git a/intake/source.py b/intake/source.py index b502af6..a7bb549 100755 --- a/intake/source.py +++ b/intake/source.py @@ -281,13 +281,13 @@ def _execute_source_action( return output -def fetch_items(source: LocalSource, timeout: int = 60) -> List[dict]: +def fetch_items(source: LocalSource, timeout: int = 60) -> List[Item]: """ Execute the feed source and return the current feed items. Returns a list of feed items on success. Throws SourceUpdateException if the feed source update failed. """ - items = [] + items: List[Item] = [] output = _execute_source_action(source, "fetch", None, timedelta(timeout))