diff options
author | Lance Stout <lancestout@gmail.com> | 2011-02-14 13:49:43 -0500 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-02-14 13:49:43 -0500 |
commit | 75584d7ad74b284d30164cde0b5efec2c845d207 (patch) | |
tree | e171f1dcd9cd46c5be823cb19233311b49938f70 /sleekxmpp/stanza/error.py | |
parent | e0f9025e7c6fe51243222aeb684b94eda1a2be5f (diff) | |
download | slixmpp-75584d7ad74b284d30164cde0b5efec2c845d207.tar.gz slixmpp-75584d7ad74b284d30164cde0b5efec2c845d207.tar.bz2 slixmpp-75584d7ad74b284d30164cde0b5efec2c845d207.tar.xz slixmpp-75584d7ad74b284d30164cde0b5efec2c845d207.zip |
Remap old method names in a better way.
This should prevent some reference cycles that will cause garbage
collection issues.
Diffstat (limited to 'sleekxmpp/stanza/error.py')
-rw-r--r-- | sleekxmpp/stanza/error.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sleekxmpp/stanza/error.py b/sleekxmpp/stanza/error.py index 09229bc6..5d1ce50d 100644 --- a/sleekxmpp/stanza/error.py +++ b/sleekxmpp/stanza/error.py @@ -77,15 +77,6 @@ class Error(ElementBase): Arguments: xml -- Use an existing XML object for the stanza's values. """ - # To comply with PEP8, method names now use underscores. - # Deprecated method names are re-mapped for backwards compatibility. - self.getCondition = self.get_condition - self.setCondition = self.set_condition - self.delCondition = self.del_condition - self.getText = self.get_text - self.setText = self.set_text - self.delText = self.del_text - if ElementBase.setup(self, xml): #If we had to generate XML then set default values. self['type'] = 'cancel' @@ -139,3 +130,13 @@ class Error(ElementBase): """Remove the <text> element.""" self._del_sub('{%s}text' % self.condition_ns) return self + + +# To comply with PEP8, method names now use underscores. +# Deprecated method names are re-mapped for backwards compatibility. +Error.getCondition = Error.get_condition +Error.setCondition = Error.set_condition +Error.delCondition = Error.del_condition +Error.getText = Error.get_text +Error.setText = Error.set_text +Error.delText = Error.del_text |