mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-09 14:13:35 +00:00
Clean up (#453)
* Fix create project to handle Google change * Handle newlines in app name Don’t output name/value for name == u'accounts:authorized_apps’, apps are listed later * Cleanup My typos: 614, 813 Pylint: 887, 3618/4184, 8657, 8751 Your typo: 6794
This commit is contained in:
@ -611,7 +611,7 @@ def callGAPI(service, function,
|
||||
handleOAuthTokenError(str(e), soft_errors or GAPI_SERVICE_NOT_AVAILABLE in throw_reasons)
|
||||
if GAPI_SERVICE_NOT_AVAILABLE in throw_reasons:
|
||||
raise GAPI_serviceNotAvailable(str(e))
|
||||
stderrErrorMsg(u'User {0}: {1)'.format(GM_Globals[GM_CURRENT_API_USER], str(e)))
|
||||
stderrErrorMsg(u'User {0}: {1}'.format(GM_Globals[GM_CURRENT_API_USER], str(e)))
|
||||
return None
|
||||
except httplib2.CertificateValidationUnsupported:
|
||||
noPythonSSLExit()
|
||||
@ -810,7 +810,7 @@ def buildGAPIServiceObject(api, act_as, use_scopes=None):
|
||||
except httplib2.ServerNotFoundError as e:
|
||||
systemErrorExit(4, e)
|
||||
except oauth2client.client.AccessTokenRefreshError as e:
|
||||
stderrErrorMsg(u'User {0}: {1)'.format(GM_Globals[GM_CURRENT_API_USER], str(e)))
|
||||
stderrErrorMsg(u'User {0}: {1}'.format(GM_Globals[GM_CURRENT_API_USER], str(e)))
|
||||
return handleOAuthTokenError(str(e), True)
|
||||
return service
|
||||
|
||||
@ -884,7 +884,7 @@ def _adjustDate(errMsg):
|
||||
match_date = re.match(u'Start date can not be later than (.*)', errMsg)
|
||||
if not match_date:
|
||||
systemErrorExit(4, errMsg)
|
||||
return (unicode(match_date.group(1)))
|
||||
return unicode(match_date.group(1))
|
||||
|
||||
def showReport():
|
||||
rep = buildGAPIObject(u'reports')
|
||||
@ -6791,7 +6791,7 @@ def printShowTeamDrives(users, csvFormat):
|
||||
if u'id' not in td:
|
||||
continue
|
||||
if u'name' not in td:
|
||||
td[u'name'] == u'<Unknown Team Drive>'
|
||||
td[u'name'] = u'<Unknown Team Drive>'
|
||||
this_td = {u'id': td[u'id'], u'name': td[u'name']}
|
||||
if this_td in tds:
|
||||
continue
|
||||
|
Reference in New Issue
Block a user