From c271d1f15a8d7a014139f6ffaac477c38ee808a6 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 3 Dec 2008 21:37:54 +0000 Subject: [PATCH] fix bad indentation --- src/common/xmpp/auth.py | 4 ++-- src/common/xmpp/client.py | 10 +++++----- src/common/xmpp/commands.py | 2 +- src/osx/growl/Growl.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/common/xmpp/auth.py b/src/common/xmpp/auth.py index 733346123..04d7fd60c 100644 --- a/src/common/xmpp/auth.py +++ b/src/common/xmpp/auth.py @@ -63,10 +63,10 @@ class NonSASL(PlugIn): self.DEBUG("Performing zero-k authentication",'ok') def hasher(s): - return sha.new(s).hexdigest() + return sha.new(s).hexdigest() def hash_n_times(s, count): - return count and hasher(hash_n_times(s, count-1)) or s + return count and hasher(hash_n_times(s, count-1)) or s hash_ = hash_n_times(hasher(hasher(self.password)+token), int(seq)) query.setTagData('hash', hash_) diff --git a/src/common/xmpp/client.py b/src/common/xmpp/client.py index 4a1c8b7e8..cbed92364 100644 --- a/src/common/xmpp/client.py +++ b/src/common/xmpp/client.py @@ -284,11 +284,11 @@ class Component(CommonClient): self.Server=server[0] CommonClient.connect(self,server=server,proxy=proxy) if self.connected and (self.typ=='jabberd2' or not self.typ and self.Dispatcher.Stream.features is not None): - self.defaultNamespace=auth.NS_CLIENT - self.Dispatcher.RegisterNamespace(self.defaultNamespace) - self.Dispatcher.RegisterProtocol('iq',dispatcher.Iq) - self.Dispatcher.RegisterProtocol('message',dispatcher.Message) - self.Dispatcher.RegisterProtocol('presence',dispatcher.Presence) + self.defaultNamespace=auth.NS_CLIENT + self.Dispatcher.RegisterNamespace(self.defaultNamespace) + self.Dispatcher.RegisterProtocol('iq',dispatcher.Iq) + self.Dispatcher.RegisterProtocol('message',dispatcher.Message) + self.Dispatcher.RegisterProtocol('presence',dispatcher.Presence) return self.connected def auth(self,name,password,dup=None,sasl=0): diff --git a/src/common/xmpp/commands.py b/src/common/xmpp/commands.py index 555a372fa..1eb105978 100644 --- a/src/common/xmpp/commands.py +++ b/src/common/xmpp/commands.py @@ -89,7 +89,7 @@ class Commands(PlugIn): conn.send(Error(request,ERR_ITEM_NOT_FOUND)) raise NodeProcessed elif node in self._handlers['']: - self._handlers[''][node]['execute'](conn,request) + self._handlers[''][node]['execute'](conn,request) else: conn.send(Error(request,ERR_ITEM_NOT_FOUND)) raise NodeProcessed diff --git a/src/osx/growl/Growl.py b/src/osx/growl/Growl.py index f035e69df..dd4fe885e 100644 --- a/src/osx/growl/Growl.py +++ b/src/osx/growl/Growl.py @@ -135,7 +135,7 @@ class netgrowl: checksum = md5.new() checksum.update(data) if self.password: - checksum.update(self.password) + checksum.update(self.password) data += checksum.digest() return data