- placeholder_chars = [("Please check your API settings.", err_img)]
- if not self.auth: return placeholder_chars
- try:
- api_char_list = self.auth.account.Characters()
- # append each char we get to the list we'll return to the
- # UI --danny
- for character in api_char_list.characters:
- ui_char_list.append( ( character.name, fetchimg.portrait_filename( character.characterID, 64 ) ) )
- except eveapi.Error, e:
- # again, we need to handle this... --danny
- return placeholder_chars
- #raise
+ placeholder_chars = ("Please check your API settings.", err_img, "0")
+
+ acct_dict = self.get_accounts()
+ if not acct_dict:
+ return [placeholder_chars]
+
+ for uid, apiKey in acct_dict.items():
+ auth = self.cached_api.auth(userID=uid, apiKey=apiKey)
+ try:
+ api_char_list = auth.account.Characters()
+ # append each char we get to the list we'll return to the
+ # UI --danny
+ for character in api_char_list.characters:
+ ui_char_list.append( ( character.name, fetchimg.portrait_filename( character.characterID, 64 ), uid) )
+ except eveapi.Error, e:
+ # again, we need to handle this... --danny
+ ui_char_list.append(placeholder_chars)