summaryrefslogtreecommitdiff
path: root/tablib
diff options
context:
space:
mode:
authorLuca Beltrame <luca.beltrame@marionegri.it>2011-07-14 09:36:35 +0200
committerLuca Beltrame <luca.beltrame@marionegri.it>2011-07-14 09:36:35 +0200
commit2c5a9af76efd93f49eb0757f8c262dbb87d5be43 (patch)
tree1a49aa17b625329edb6e53149d9a7ac8999a8670 /tablib
parentcd5aa4fc06d9af90b076c02a9f596bb84db1d09f (diff)
downloadtablib-2c5a9af76efd93f49eb0757f8c262dbb87d5be43.tar.gz
Fix pickling (again). Unit tests still pass.
Diffstat (limited to 'tablib')
-rw-r--r--tablib/core.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tablib/core.py b/tablib/core.py
index 7e78b56..eeb319d 100644
--- a/tablib/core.py
+++ b/tablib/core.py
@@ -57,7 +57,14 @@ class Row(object):
del self._row[i]
def __getstate__(self):
- return {'slot': [getattr(self, slot) for slot in self.__slots__]}
+
+ slots = dict()
+
+ for slot in self.__slots__:
+ attribute = getattr(self, slot)
+ slots[slot] = attribute
+
+ return slots
def __setstate__(self, state):
for (k, v) in list(state.items()): setattr(self, k, v)