Skip to content
Snippets Groups Projects
Commit dd18cb3a authored by Martin Lange's avatar Martin Lange
Browse files

changed all slot access errors to KeyError

parent ed024303
No related branches found
No related tags found
1 merge request!147Easy slot access
Pipeline #124457 passed with stages
in 2 minutes and 38 seconds
......@@ -296,7 +296,7 @@ class Component(IComponent, Loggable, ABC):
"""
if name in self.inputs:
if name in self.outputs:
raise ValueError(
raise KeyError(
f"Name {name} exists in inputs as well as outputs of component {self.name}"
)
......
......@@ -104,7 +104,7 @@ class TestComponent(unittest.TestCase):
with self.assertRaises(KeyError):
_inp = comp_ok["abc"]
with self.assertRaises(ValueError):
with self.assertRaises(KeyError):
_inp = comp_fail["IO"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment