Fixed a few edge cases.

This commit is contained in:
Michael Lazar
2015-12-03 22:04:59 -08:00
parent 5244dfc2d0
commit 3e5572ea25
2 changed files with 20 additions and 14 deletions

View File

@@ -97,7 +97,6 @@ class OAuthHelper(object):
self.term.open_browser(authorize_url)
io.start()
if self.term.loader.exception:
io.clear_instance()
return
else:
# Open the terminal webbrowser in a background thread and wait
@@ -116,6 +115,9 @@ class OAuthHelper(object):
elif self.params['error']:
self.term.show_notification('Authentication error')
return
elif self.params['state'] is None:
# Something went wrong but it's not clear what happened
return
elif self.params['state'] != state:
self.term.show_notification('UUID mismatch')
return