From 9f05b0e1e2855a78a560473f3414d69ac898005b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 12 May 2010 11:03:46 -0400 Subject: [PATCH] Fix problem in Queuing odict/HookeConfigParser. I'm not sure why odict.__setstate__() is not being called before .__setitem__(), but this hack seems to be a valid workaround. --- hooke/compat/odict.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hooke/compat/odict.py b/hooke/compat/odict.py index 22de85c..d204c6d 100644 --- a/hooke/compat/odict.py +++ b/hooke/compat/odict.py @@ -208,6 +208,8 @@ class odict(dict): self._keys.remove(key) def __setitem__(self, key, item): + if not hasattr(self, '_keys'): + self._keys = [] # work around multiprocessing.Queue rebuild if key not in self: self._keys.append(key) dict.__setitem__(self, key, item) -- 2.26.2