Commit d3c48638 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by Generic Bliss account for Control Software
Browse files

[CLIENT] Properly raise AttributeError in ParamBase, needed by hasattr

parent 8797ef9b
......@@ -170,7 +170,10 @@ class ParamBase:
return model.__iter__()
def __getattr__(self, name):
return self[name]
if name in self.keys():
return self[name]
klass = self.__class__
raise AttributeError(f'Item {name} not found in {klass.__name__}')
def __setattr__(self, name, val):
self[name] = val
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment