summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0332/stanza/data.py
diff options
context:
space:
mode:
authorSangeeth Saravanaraj <sangeeth@riptideio.com>2015-02-05 17:35:04 +0530
committerSangeeth Saravanaraj <sangeeth@riptideio.com>2015-02-05 17:35:04 +0530
commit8bc70264efd17390fbe795e359a7cbb0442fd0d1 (patch)
tree818dacc3156e4f5ee085a38fe010f34bf820290c /sleekxmpp/plugins/xep_0332/stanza/data.py
parentc16b86220047e2a2b77c585d6b0d72f5087c1371 (diff)
downloadslixmpp-8bc70264efd17390fbe795e359a7cbb0442fd0d1.tar.gz
slixmpp-8bc70264efd17390fbe795e359a7cbb0442fd0d1.tar.bz2
slixmpp-8bc70264efd17390fbe795e359a7cbb0442fd0d1.tar.xz
slixmpp-8bc70264efd17390fbe795e359a7cbb0442fd0d1.zip
misc updates..
Diffstat (limited to 'sleekxmpp/plugins/xep_0332/stanza/data.py')
-rw-r--r--sleekxmpp/plugins/xep_0332/stanza/data.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/sleekxmpp/plugins/xep_0332/stanza/data.py b/sleekxmpp/plugins/xep_0332/stanza/data.py
index e77d2585..9a08426b 100644
--- a/sleekxmpp/plugins/xep_0332/stanza/data.py
+++ b/sleekxmpp/plugins/xep_0332/stanza/data.py
@@ -16,14 +16,15 @@ class Data(ElementBase):
The data element.
"""
name = 'data'
- namespace = ''
+ namespace = 'urn:xmpp:http'
interfaces = set(['data'])
plugin_attrib = 'data'
+ is_extension = True
- def get_data(self):
- print "Data:: get_data()"
+ def get_data(self, encoding='text'):
+ data = self._get_sub_text(encoding, None)
+ return str(data) if data is not None else data
def set_data(self, data, encoding='text'):
- print "Data:: set_data()"
self._set_sub_text(encoding, text=data)