Permalink
Browse files

Use signalqueue.utils.ADict for the EnqueuedSignal `struct` property.

  • Loading branch information...
fish2000 committed Aug 19, 2012
1 parent 8e41177 commit 413b0e21d7f9c6355c06de328b75dad17cb7a12d
Showing with 7 additions and 3 deletions.
  1. +4 −3 signalqueue/models.py
  2. +3 −0 signalqueue/utils.py
View
@@ -127,9 +127,10 @@ class Meta:
def _get_struct(self):
if self.value:
- from signalqueue.utils import json
- return json.loads(self.value)
- return {}
+ from signalqueue.utils import json, ADict
+ return ADict(
+ json.loads(self.value))
+ return ADict()
def _set_struct(self, newstruct):
if self.keys.issuperset(newstruct.keys()):
View
@@ -90,6 +90,9 @@ def __getattr__(self, name):
def __setattr__(self, name, value):
self[name] = value
+
+ def __delattr__(self, name):
+ del self[name]
# To consistently use the fastest serializer possible, use:

0 comments on commit 413b0e2

Please sign in to comment.