From 8056027fd7da85e93f60a5d73bbc61daa87c3d46 Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Sun, 27 Oct 2024 22:32:57 -0500 Subject: [PATCH] try - handling finding endpoint group --- errbot/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/errbot/utils.py b/errbot/utils.py index 7e54b92d78..d838e04619 100644 --- a/errbot/utils.py +++ b/errbot/utils.py @@ -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: