Fix output of update --dry-run
This commit is contained in:
parent
53b7c83ac6
commit
e2b2ee2a00
|
@ -125,7 +125,7 @@ def cmd_update(cmd_args):
|
||||||
update_items(source, items)
|
update_items(source, items)
|
||||||
else:
|
else:
|
||||||
for item in items:
|
for item in items:
|
||||||
print("Item:", item)
|
print("Item:", item._item)
|
||||||
except InvalidConfigException as ex:
|
except InvalidConfigException as ex:
|
||||||
print("Could not fetch", args.source)
|
print("Could not fetch", args.source)
|
||||||
print(ex)
|
print(ex)
|
||||||
|
|
|
@ -281,13 +281,13 @@ def _execute_source_action(
|
||||||
return output
|
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.
|
Execute the feed source and return the current feed items.
|
||||||
Returns a list of feed items on success.
|
Returns a list of feed items on success.
|
||||||
Throws SourceUpdateException if the feed source update failed.
|
Throws SourceUpdateException if the feed source update failed.
|
||||||
"""
|
"""
|
||||||
items = []
|
items: List[Item] = []
|
||||||
|
|
||||||
output = _execute_source_action(source, "fetch", None, timedelta(timeout))
|
output = _execute_source_action(source, "fetch", None, timedelta(timeout))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue