Spotted and fixed an outstanding bug where lists weren't grabbed with the correct account

This commit is contained in:
Anna 2010-05-21 12:34:56 -04:00
parent f7696e2d67
commit a2317113ec

View File

@ -160,6 +160,8 @@ class Hrafn():
def update_single_window(self, pane):
print 'debug: updating ' + pane.get_list_name()
list_name = pane.get_list_name()
# Single tweets should never be updated here
@ -167,26 +169,28 @@ class Hrafn():
return
# Determine username and appropriate account to use
found = False
account = None
username = re.sub('/Home', '', list_name)
if self.accounts.has_key(username):
account = self.accounts[username]
found = True
if not found:
if account is None:
username = re.sub('@', '', list_name)
if self.accounts.has_key(username):
account = self.accounts[username]
found = True
if not found:
if account is None:
username = re.sub('/Direct Messages', '', list_name)
if self.accounts.has_key(username):
account = self.accounts[username]
found = True
if not found:
if account is None:
username = re.sub(r'list: (.*)/.*', r'\1', list_name)
if self.accounts.has_key(username):
account = self.accounts[username]
if account is None:
account = self.api
username = self.username