diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-26 21:49:42 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-26 21:49:42 (GMT) |
commit | c472246d81f2e9e7842c0d6e663ea01429e2efa9 (patch) | |
tree | d3443179fa9db07cfff1c5de997e450493e008cd /Lib/xml/dom | |
parent | 747d48cf27e1843f7d1046b4e8127833a40cf9b3 (diff) | |
download | cpython-c472246d81f2e9e7842c0d6e663ea01429e2efa9.zip cpython-c472246d81f2e9e7842c0d6e663ea01429e2efa9.tar.gz cpython-c472246d81f2e9e7842c0d6e663ea01429e2efa9.tar.bz2 |
Issue #10131: Fixed deep copying of minidom documents. Based on patch
by Marian Ganisin.
Diffstat (limited to 'Lib/xml/dom')
-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 |