summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-11-26 21:50:54 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-11-26 21:50:54 (GMT)
commit15f070f8451db36d56bc3b99f14a6899b73cd305 (patch)
treedad5c3c21c1ec2eefeb49c99dda9774eae126b45 /Lib/xml
parent9e87f3d79fbf8d759d1b485296619d4f35cf1701 (diff)
parentc472246d81f2e9e7842c0d6e663ea01429e2efa9 (diff)
downloadcpython-15f070f8451db36d56bc3b99f14a6899b73cd305.zip
cpython-15f070f8451db36d56bc3b99f14a6899b73cd305.tar.gz
cpython-15f070f8451db36d56bc3b99f14a6899b73cd305.tar.bz2
Issue #10131: Fixed deep copying of minidom documents. Based on patch
by Marian Ganisin.
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/dom/minicompat.py6
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