diff --git a/buddy.py b/buddy.py index 2aa004c..256038f 100644 --- a/buddy.py +++ b/buddy.py @@ -108,7 +108,7 @@ class BuddyList(dict): for number, (status, time) in contacts.iteritems(): buddy = self[number] if status is None: - buddy.statusMessage = "" + buddy.statusMsg = "" else: buddy.statusMsg = utils.softToUni(status) self.updateSpectrum(buddy) diff --git a/utils.py b/utils.py index e53d7fe..b325922 100644 --- a/utils.py +++ b/utils.py @@ -24,6 +24,7 @@ u""" import e4u import base64 import hashlib +import base64 def ago(secs): periods = [u"second", u"minute", u"hour", u"day", u"week", u"month", u"year", u"decade"] @@ -50,4 +51,4 @@ def decodePassword(password): return base64.b64decode(bytes(password.encode(u"utf-8"))) def sha1hash(data): - return hashlib.sha1(data).hexdigest() + return base64.b64encode(hashlib.sha1(data).digest())