Cleanup doRequestOAuth

admin_email isn't used; If it's going to be used I'd say:
`
if GC-Values{GC_ADMIN):
  admin_email = GC_Values[GC_ADMIN]
 else:
  admin_email = raw_input(u'Please enter your admin email address: ')
`
'oauth2' isn't in API_VER_MAPPING so the remove fails. If it might go
back in but you don't want it here, say:
`
if u'oauth2' in apis:
  apis.remove(u'oauth2')
`
This commit is contained in:
Ross Scroggs
2015-12-31 17:30:39 -08:00
parent 775b0c8c60
commit f6dd0ccd12

View File

@ -8742,9 +8742,7 @@ def select_default_scopes(apis):
return apis
def doRequestOAuth():
admin_email = raw_input(u'Please enter your admin email address: ')
apis = API_VER_MAPPING.keys()
apis.remove(u'oauth2')
all_apis = {}
for api in apis:
version = getAPIVer(api)
@ -8845,7 +8843,7 @@ def doRequestOAuth():
break
os.system([u'clear', u'cls'][os.name == u'nt'])
os.system([u'clear', u'cls'][os.name == u'nt'])
print u'Please authorize your client id for the %s scopes:' % (len(selected_scopes))
print u'Please authorize your service account client id for the %s scopes:' % (len(selected_scopes))
print
print u','.join(selected_scopes)