Skip to content

Commit

Permalink
entry_points() select or get
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Johnson <[email protected]>
  • Loading branch information
najohnsn committed Oct 18, 2023
1 parent 0934480 commit 2a4e1b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tnz/zti.py
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,12 @@ def __install_plugins(self):
return

plugins = []
zti_plugins = entry_points().get("zti.commands", [])
eps = entry_points()
if hasattr(eps, "select"):
zti_plugins = eps.select(group="zti.commands")
else:
zti_plugins = eps.get("zti.commands", [])

for entry in zti_plugins:
name = entry.name
plugins.append(name)
Expand Down

0 comments on commit 2a4e1b2

Please sign in to comment.