summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/stanzabase.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-06-07 19:55:39 -0400
committerLance Stout <lancestout@gmail.com>2010-06-07 19:55:39 -0400
commit8bb0f5e34c443a9efc05dadb2a77a95ac94c2c98 (patch)
tree8f1bc22b2e2bf214dd5a240d59bd10243250e28a /sleekxmpp/xmlstream/stanzabase.py
parent3c939313d2381accf4fe449dd569df2be6fe3c55 (diff)
downloadslixmpp-8bb0f5e34c443a9efc05dadb2a77a95ac94c2c98.tar.gz
slixmpp-8bb0f5e34c443a9efc05dadb2a77a95ac94c2c98.tar.bz2
slixmpp-8bb0f5e34c443a9efc05dadb2a77a95ac94c2c98.tar.xz
slixmpp-8bb0f5e34c443a9efc05dadb2a77a95ac94c2c98.zip
Needed to use copy.deepcopy() to copy XML objects to make sure that the entire tree is copied.
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index a0d8f5d0..024fe6cf 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -311,7 +311,7 @@ class ElementBase(tostring.ToString):
return self
def __copy__(self):
- return self.__class__(xml=copy.copy(self.xml), parent=self.parent)
+ return self.__class__(xml=copy.deepcopy(self.xml), parent=self.parent)
#def __del__(self): #prevents garbage collection of reference cycle
# if self.parent is not None:
@@ -391,5 +391,5 @@ class StanzaBase(ElementBase):
self.stream.sendRaw(self.__str__())
def __copy__(self):
- return self.__class__(xml=copy.copy(self.xml), stream=self.stream)
+ return self.__class__(xml=copy.deepcopy(self.xml), stream=self.stream)