diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2011-07-14 15:15:42 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2011-07-14 15:15:42 -0400 |
| commit | 33a83316df627f49e95c744c6ceb87ff051ddbf7 (patch) | |
| tree | a3a934a85a48d15fa2577abc436393c027c4562d /tablib/core.py | |
| parent | e74a8f41cc0bdfe1cb9aae90b9240fd15208e9cb (diff) | |
| parent | 2f8083bda6d78246d41d4cf26f19c5bb447de30f (diff) | |
| download | tablib-33a83316df627f49e95c744c6ceb87ff051ddbf7.tar.gz | |
Merge branch 'fix_pickle_bug_2' of https://github.com/cswegger/tablib into develop
Diffstat (limited to 'tablib/core.py')
| -rw-r--r-- | tablib/core.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tablib/core.py b/tablib/core.py index 0429136..79fdc4f 100644 --- a/tablib/core.py +++ b/tablib/core.py @@ -29,7 +29,7 @@ __docformat__ = 'restructuredtext' class Row(object): """Internal Row object. Mainly used for filtering.""" - __slots__ = ['tuple', '_row', 'tags'] + __slots__ = ['_row', 'tags'] def __init__(self, row=list(), tags=list()): self._row = list(row) @@ -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) |
