Fix output of update --dry-run

This commit is contained in:
Tim Van Baak 2023-06-20 21:41:00 -07:00
parent 53b7c83ac6
commit e2b2ee2a00
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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))