projects
/
hooke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d68a75a
)
Fix problem in Queuing odict/HookeConfigParser.
author
W. Trevor King
<wking@drexel.edu>
Wed, 12 May 2010 15:03:46 +0000
(11:03 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Wed, 12 May 2010 15:03:46 +0000
(11:03 -0400)
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
patch
|
blob
|
history
diff --git
a/hooke/compat/odict.py
b/hooke/compat/odict.py
index 22de85c2aef9eacb2fd691f325e086f7303b27be..d204c6d8b5956630b1d63bbc2a98a8d3d77e538a 100644
(file)
--- 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)