diff options
Diffstat (limited to 'Lib/xml/dom/minicompat.py')
-rw-r--r-- | Lib/xml/dom/minicompat.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/xml/dom/minicompat.py b/Lib/xml/dom/minicompat.py index 1244500..5d6fae9 100644 --- a/Lib/xml/dom/minicompat.py +++ b/Lib/xml/dom/minicompat.py @@ -64,10 +64,10 @@ class NodeList(list): length = property(_get_length, _set_length, doc="The number of nodes in the NodeList.") - def __getstate__(self): - return list(self) - + # For backward compatibility def __setstate__(self, state): + if state is None: + state = [] self[:] = state |