summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0009/binding.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-02-09 09:45:45 +0800
committerLance Stout <lancestout@gmail.com>2011-02-09 10:02:14 +0800
commit4b71fba64c8675aa891fd6a92eb6f0f045e4a48e (patch)
tree006b466ce33193dcacb62fe240a4bbab05e9f981 /sleekxmpp/plugins/xep_0009/binding.py
parent1ed06bebcdbe82e0c528c98134e381f5b4dcccad (diff)
downloadslixmpp-4b71fba64c8675aa891fd6a92eb6f0f045e4a48e.tar.gz
slixmpp-4b71fba64c8675aa891fd6a92eb6f0f045e4a48e.tar.bz2
slixmpp-4b71fba64c8675aa891fd6a92eb6f0f045e4a48e.tar.xz
slixmpp-4b71fba64c8675aa891fd6a92eb6f0f045e4a48e.zip
Fix the xep_0009 import (no more relatives)
Also, remove trailing spaces in all files of this plugin
Diffstat (limited to 'sleekxmpp/plugins/xep_0009/binding.py')
-rw-r--r--sleekxmpp/plugins/xep_0009/binding.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/sleekxmpp/plugins/xep_0009/binding.py b/sleekxmpp/plugins/xep_0009/binding.py
index 700beb2f..30f02d36 100644
--- a/sleekxmpp/plugins/xep_0009/binding.py
+++ b/sleekxmpp/plugins/xep_0009/binding.py
@@ -11,11 +11,9 @@ import base64
import logging
import time
-
-
log = logging.getLogger(__name__)
-_namespace = 'jabber:iq:rpc'
+_namespace = 'jabber:iq:rpc'
def fault2xml(fault):
value = dict()
@@ -25,7 +23,7 @@ def fault2xml(fault):
fault.append(_py2xml((value)))
return fault
-def xml2fault(params):
+def xml2fault(params):
vals = []
for value in params.findall('{%s}value' % _namespace):
vals.append(_xml2py(value))
@@ -101,7 +99,7 @@ def xml2py(params):
def _xml2py(value):
namespace = 'jabber:iq:rpc'
if value.find('{%s}nil' % namespace) is not None:
- return None
+ return None
if value.find('{%s}i4' % namespace) is not None:
return int(value.find('{%s}i4' % namespace).text)
if value.find('{%s}int' % namespace) is not None:
@@ -131,7 +129,7 @@ def _xml2py(value):
class rpcbase64(object):
-
+
def __init__(self, data):
#base 64 encoded string
self.data = data
@@ -148,7 +146,7 @@ class rpcbase64(object):
class rpctime(object):
-
+
def __init__(self,data=None):
#assume string data is in iso format YYYYMMDDTHH:MM:SS
if type(data) is str: