Do some error handling

This commit is contained in:
blitzmann
2018-03-11 14:47:57 -04:00
parent 30c1ab125c
commit 6c6e8a9972
3 changed files with 28 additions and 4 deletions

View File

@@ -227,12 +227,13 @@ class Esi(object):
cdata = esisecurity.verify()
print(cdata)
currentCharacter = self.getSsoCharacter(cdata['CharacterID'])
currentCharacter = self.getSsoCharacter(cdata['CharacterName'])
if currentCharacter is None:
currentCharacter = SsoCharacter(cdata['CharacterID'], cdata['CharacterName'], config.getClientSecret())
currentCharacter.esi_client = Esi.genEsiClient(esisecurity)
Esi.update_token(currentCharacter, auth_response) # this also sets the esi security token
Esi.update_token(currentCharacter, auth_response) # this also sets the esi security token
eos.db.save(currentCharacter)

View File

@@ -85,7 +85,7 @@ class AuthHandler(http.server.BaseHTTPRequestHandler):
pyfalog.info("Successfully logged into EVE.")
msg = "If you see this message then it means you should be logged into CREST. You may close this window and return to the application."
else:
# For implicit mode, we have to serve up the page which will take the hash and redirect useing a querystring
# For implicit mode, we have to serve up the page which will take the hash and redirect using a querystring
pyfalog.info("Processing response from EVE Online.")
msg = "Processing response from EVE Online"
except Exception as ex: