diff --git a/xray/storage.py b/xray/storage.py index 6ab366b..91430e8 100644 --- a/xray/storage.py +++ b/xray/storage.py @@ -119,6 +119,11 @@ class DataStorage(dict): setattr(self,key,value) super().__setitem__(key, value) + def __setattr__(self, key, value): + """ allows to add fields with data.test=4 """ + super().__setitem__(key, value) + super().__setattr__(key,value) + def __delitem__(self, key): delattr(self,key) super().__delitem__(key)