OrderedDict does not work with pickle

Issue #1421 resolved
Former user created an issue

The OrderedDict class in utils.py does not properly work with pickling, which can be sixed by the following simple patch:

--- util.py.orig        2009-05-18 18:30:23.000000000 +0200
+++ util.py     2009-05-24 00:10:42.000000000 +0200
@@ -737,6 +737,8 @@
         return iter(self.items())

     def __setitem__(self, key, object):
+        if not hasattr(self, '_list'):
+            self._list = []
         if key not in self:
             self._list.append(key)
         dict.__setitem__(self, key, object)

Comments (3)

  1. Log in to comment