Handle new OAuth2 Token error, ignore periods in messages (#481)

* Handle new OAuth2 Token error, ignore periods in messages

* Fix typo
This commit is contained in:
Ross Scroggs
2017-04-17 07:35:03 -07:00
committed by Jay Lee
parent ab94208bb5
commit 8e3c632a7c
2 changed files with 13 additions and 5 deletions

View File

@ -493,7 +493,7 @@ def doGAMVersion(checkForArgs=True):
doGAMCheckForUpdates(forceCheck=True)
def handleOAuthTokenError(e, soft_errors):
if e in OAUTH2_TOKEN_ERRORS or e.startswith(u'Invalid response'):
if e.replace(u'.', u'') in OAUTH2_TOKEN_ERRORS or e.startswith(u'Invalid response'):
if soft_errors:
return None
if not GM_Globals[GM_CURRENT_API_USER]:
@ -6687,7 +6687,7 @@ def doCreateProject(login_hint=None):
print u'Ooops!!\n\n%s\n\nIs not a valid client ID. Please make sure you are following the directions exactly and that there are no extra spaces in your client ID.' % client_id
return False
if content[u'error_description'] == u'Unauthorized':
print u'Ooops!!\n\n%s\n\nIis not a valid client secret. Please make sure you are following the directions exactly and that there are no extra spaces in your client secret.' % client_secret
print u'Ooops!!\n\n%s\n\nIs not a valid client secret. Please make sure you are following the directions exactly and that there are no extra spaces in your client secret.' % client_secret
return False
print u'Unknown error: %s' % content
return False