Skip to content

Commit

Permalink
Suggest running reentry scan when entry point cannot be resolved (#…
Browse files Browse the repository at this point in the history
…3765)

This is the case either when the entry point cannot be found at all or
when multiple entry points are registered with the same name.
  • Loading branch information
ltalirz authored Mar 21, 2020
1 parent 44e12d7 commit d0b89c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aiida/plugins/entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,12 @@ def get_entry_point(group, name):
entry_points = [ep for ep in get_entry_points(group) if ep.name == name]

if not entry_points:
raise MissingEntryPointError("Entry point '{}' not found in group '{}'".format(name, group))
raise MissingEntryPointError("Entry point '{}' not found in group '{}'.".format(name, group) +
'Try running `reentry scan` to update the entry point cache.')

if len(entry_points) > 1:
raise MultipleEntryPointError("Multiple entry points '{}' found in group".format(name, group))
raise MultipleEntryPointError("Multiple entry points '{}' found in group '{}'. ".format(name, group) +
'Try running `reentry scan` to repopulate the entry point cache.')

return entry_points[0]

Expand Down

0 comments on commit d0b89c1

Please sign in to comment.