diff options
author | Nathan Fritz <nathan@andyet.net> | 2010-07-19 13:53:41 -0700 |
---|---|---|
committer | Nathan Fritz <nathan@andyet.net> | 2010-07-19 13:53:41 -0700 |
commit | 130a148d3434b001e24a544022ee4df8597dbe96 (patch) | |
tree | 77384d3f49990b2e41dac6717c1ab332adc6e950 /sleekxmpp/plugins/xep_0004.py | |
parent | 16104b6e56892b65d91abe467b124ca1e86ccfcf (diff) | |
download | slixmpp-130a148d3434b001e24a544022ee4df8597dbe96.tar.gz slixmpp-130a148d3434b001e24a544022ee4df8597dbe96.tar.bz2 slixmpp-130a148d3434b001e24a544022ee4df8597dbe96.tar.xz slixmpp-130a148d3434b001e24a544022ee4df8597dbe96.zip |
added fromXML/getXML compatiblity to the new xep-0004 w/ deprecated warnings
Diffstat (limited to 'sleekxmpp/plugins/xep_0004.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0004.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0004.py b/sleekxmpp/plugins/xep_0004.py index e3d2b55a..712e84ae 100644 --- a/sleekxmpp/plugins/xep_0004.py +++ b/sleekxmpp/plugins/xep_0004.py @@ -35,6 +35,15 @@ class Form(ElementBase): field['options'] = options return field + def getXML(self): + logging.warning("Form.getXML() is deprecated API compatibility with plugins/old_0004.py") + return self.xml + + def fromXML(self, xml): + logging.warning("Form.fromXML() is deprecated API compatibility with plugins/old_0004.py") + n = Form(xml=xml) + return n + def addItem(self, values): itemXML = ET.Element('{%s}item' % self.namespace) self.xml.append(itemXML) |