Skip to content

Commit

Permalink
try - handling finding endpoint group
Browse files Browse the repository at this point in the history
  • Loading branch information
sijis committed Oct 28, 2024
1 parent dd13b04 commit 8056027
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion errbot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,12 @@ def entry_point_plugins(group):
paths = []

eps = importlib.metadata.entry_points()
for entry_point in eps.select(group=group):
try:
entry_points = eps.select(group=group)
except AttributeError:
entry_points = eps.get(group, ())

for entry_point in entry_points:
module_name = entry_point.module
file_name = module_name.replace(".", "/") + ".py"
for f in entry_point.dist.files:
Expand Down

0 comments on commit 8056027

Please sign in to comment.