Skip to content

Commit

Permalink
Merge pull request #956 from dstl/plugins_fix
Browse files Browse the repository at this point in the history
Fix plugins for latest versions of Python
  • Loading branch information
sdhiscocks committed Feb 13, 2024
2 parents b018512 + d31f31f commit ed5cf52
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions stonesoup/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@
from importlib.metadata import entry_points

try:
_plugin_points = entry_points()['stonesoup.plugins']
except KeyError:
_plugin_points = []
_plugin_points = entry_points(group='stonesoup.plugins')
except TypeError: # Older interface, doesn't accept group keyword
try:
_plugin_points = entry_points()['stonesoup.plugins']
except KeyError:
_plugin_points = []

for entry_point in _plugin_points:
try:
name = entry_point.name
Expand Down

0 comments on commit ed5cf52

Please sign in to comment.