mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-23 19:19:53 +00:00
Needed to use copy.deepcopy() to copy XML objects to make sure that the entire tree is copied.
This commit is contained in:
parent
3c939313d2
commit
8bb0f5e34c
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue