Skip to content

Commit

Permalink
Update metadata-related code to accommodate fetchcode updates #365
Browse files Browse the repository at this point in the history
Reference: #365
Signed-off-by: John M. Horan <[email protected]>
  • Loading branch information
johnmhoran committed Jul 19, 2024
1 parent f31dc0e commit 8f374f5
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 453 deletions.
12 changes: 6 additions & 6 deletions purldb-toolkit/src/purldb_toolkit/purlcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ def collect_metadata(purl):
from fetchcode/package.py.
"""
collected_metadata = []
for release in list(info(purl)):
if release is None:
continue
release_detail = release.to_dict()
release_detail.move_to_end("purl", last=False)
collected_metadata.append(release_detail)
purl_metadata = info(purl)
if purl_metadata:
for release in list(purl_metadata):
release_detail = release.to_dict()
release_detail.move_to_end("purl", last=False)
collected_metadata.append(release_detail)

return collected_metadata

Expand Down
Loading

0 comments on commit 8f374f5

Please sign in to comment.