Skip to content

Commit

Permalink
better failure and exit if identifier was not found in registry
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Sep 30, 2018
1 parent 40657c3 commit 4de9373
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion codemeta/codemeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ def main():
})
for stream, inputtype in inputfiles:
if inputtype == "registry":
update(data, getregistry(stream, registry))
try:
update(data, getregistry(stream, registry))
except KeyError as e:
print("ERROR: No such identifier in registry: ", stream,file=sys.stderr)
sys.exit(3)
elif inputtype in ("pip","python","distutils"):
piplines = stream.read().split("\n")
update(data, parsepip(data, piplines, mapping, args.with_entrypoints, args.with_orcid))
Expand Down

0 comments on commit 4de9373

Please sign in to comment.