Fix DataHolder to handle hasattr
It needs to raise an AttributeError if it doesn't have the attribute.
This commit is contained in:
parent
cddb5bf11d
commit
8615d58e80
@ -55,7 +55,10 @@ class DataHolder(dict):
|
||||
self[attr] = value
|
||||
|
||||
def __getattr__(self, attr):
|
||||
if attr in self:
|
||||
return self[attr]
|
||||
else:
|
||||
raise AttributeError
|
||||
|
||||
def __setattr__(self, attr, value):
|
||||
self[attr] = value
|
||||
|
Loading…
Reference in New Issue
Block a user