diff options
author | Sangeeth Saravanaraj <sangeeth@riptideio.com> | 2015-02-05 17:35:04 +0530 |
---|---|---|
committer | Sangeeth Saravanaraj <sangeeth@riptideio.com> | 2015-02-05 17:35:04 +0530 |
commit | 8bc70264efd17390fbe795e359a7cbb0442fd0d1 (patch) | |
tree | 818dacc3156e4f5ee085a38fe010f34bf820290c /sleekxmpp/plugins/xep_0332/stanza/response.py | |
parent | c16b86220047e2a2b77c585d6b0d72f5087c1371 (diff) | |
download | slixmpp-8bc70264efd17390fbe795e359a7cbb0442fd0d1.tar.gz slixmpp-8bc70264efd17390fbe795e359a7cbb0442fd0d1.tar.bz2 slixmpp-8bc70264efd17390fbe795e359a7cbb0442fd0d1.tar.xz slixmpp-8bc70264efd17390fbe795e359a7cbb0442fd0d1.zip |
misc updates..
Diffstat (limited to 'sleekxmpp/plugins/xep_0332/stanza/response.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0332/stanza/response.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sleekxmpp/plugins/xep_0332/stanza/response.py b/sleekxmpp/plugins/xep_0332/stanza/response.py index d863efa3..0fc46de8 100644 --- a/sleekxmpp/plugins/xep_0332/stanza/response.py +++ b/sleekxmpp/plugins/xep_0332/stanza/response.py @@ -41,17 +41,21 @@ class Response(ElementBase): name = 'response' namespace = 'urn:xmpp:http' - interfaces = set(['code', 'version']) + interfaces = set(['code', 'message', 'version']) plugin_attrib = 'resp' def get_code(self): - print "Response:: get_code()" + code = self._get_attr('statusCode', None) + return int(code) if code is not None else code def set_code(self, code): - print "Response:: set_code()" self._set_attr('statusCode', str(code)) - self._set_attr('statusMessage', str(code)) + + def get_message(self): + return self._get_attr('statusMessage', '') + + def set_message(self, message): + self._set_attr('statusMessage', message) def set_version(self, version='1.1'): - print "Response:: set_version()" self._set_attr('version', version) |