Fixed some problems with oauthtwitter
This commit is contained in:
parent
7877fa2412
commit
9e0e431d4c
2 changed files with 5 additions and 7 deletions
8
hrafn.py
8
hrafn.py
|
@ -56,7 +56,7 @@ class Hrafn():
|
|||
self.db = shelve.open(db_file)
|
||||
|
||||
if not self.db.has_key('tokens'):
|
||||
self.db['tokens'] = {}
|
||||
self.db['tokens'] = []
|
||||
|
||||
if not self.db.has_key('active_page'):
|
||||
self.db['active_page'] = 0
|
||||
|
@ -540,9 +540,7 @@ class Hrafn():
|
|||
if token is None:
|
||||
return
|
||||
|
||||
api = apithreads.CustomApi(token)
|
||||
username = api.username
|
||||
|
||||
# fixme: need this to work, but need username AFTER we create the API...
|
||||
if not self.accounts.has_key(username):
|
||||
tokens = self.db['tokens']
|
||||
tokens.append(token)
|
||||
|
@ -551,7 +549,7 @@ class Hrafn():
|
|||
|
||||
|
||||
def add_account(self, token):
|
||||
api = CustomApi(token)
|
||||
api = apithreads.CustomApi(token)
|
||||
username = api.username
|
||||
self.accounts[username] = api
|
||||
self.accounts[username].sig_proxy.connect('lists-ready', self.on_lists_ready)
|
||||
|
|
Reference in a new issue