diff --git a/catkit2/testbed/service_proxy.py b/catkit2/testbed/service_proxy.py index 3df5626e..71481ddf 100644 --- a/catkit2/testbed/service_proxy.py +++ b/catkit2/testbed/service_proxy.py @@ -107,9 +107,9 @@ def get_service_interface(cls, interface_name): if interface_name is None: return ServiceProxy - entry_point = importlib_metadata.entry_points(group='catkit2.proxies', name=interface_name) + entry_points = importlib_metadata.entry_points(group='catkit2.proxies') - if not entry_point: + if interface_name not in entry_points: raise AttributeError(f"Service proxy class with interface name '{interface_name}' not found. Did you set it as an entry point?") - return entry_point[0].load() + return entry_points[interface_name].load()