Handle bad acctList settings

develop
knotteye 2021-04-25 15:06:00 -05:00
parent 4b55caca87
commit 4560215d7a
1 changed files with 9 additions and 3 deletions

View File

@ -200,9 +200,15 @@ class App(QMainWindow):
if not acctList: if not acctList:
self.newAcctDialog() self.newAcctDialog()
return return
for acct in acctList: for ind in range(0,len(acctList)):
CallThread(getAvi, None, acct['instance']) CallThread(getAvi, None, acctList[ind]['instance'])
self.initAcct(acct['instance'], acct['username']) try:
self.initAcct(acctList[ind]['instance'], acctList[ind]['username'])
except:
print("account info corrupted, deleting")
del acctList[ind]
if acctList:
self.settings.setValue('acctList', acctList)
def systrayClicked(self, reason): def systrayClicked(self, reason):
if reason == QSystemTrayIcon.Trigger: if reason == QSystemTrayIcon.Trigger: