Skip to content

Commit

Permalink
client: catch queries without results
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Apr 1, 2023
1 parent d8502a9 commit 9e41337
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mpcontribs-client/mpcontribs/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1962,6 +1962,9 @@ def download_contributions(
start = time.perf_counter()

ids = list(values[component]["ids"])
if not ids:
continue

paths = self._download_resource(
resource=component, ids=ids, fmt=fmt,
outdir=outdir, overwrite=overwrite, timeout=timeout
Expand All @@ -1977,6 +1980,9 @@ def download_contributions(
components_loaded[component][c["id"]] = cls.from_dict(c)

cids = list(values["ids"])
if not cids:
continue

paths = self._download_resource(
resource="contributions", ids=cids, fmt=fmt,
outdir=outdir, overwrite=overwrite, timeout=timeout
Expand Down

0 comments on commit 9e41337

Please sign in to comment.