Projects STRLCPY got-your-back Commits 6cef1e7c
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    gyb.py
    skipped 347 lines
    348 348   if selected_scopes[i] == '*':
    349 349   scopes.append(possible_scopes[i])
    350 350   credentials = _run_oauth_flow(client_id, client_secret, scopes, access_type='offline', login_hint=auth_as)
    351  - writeCredentials(credentials, cfgFile)
     351 + writeCredentials(credentials)
    352 352   
    353  -def writeCredentials(creds, cfgFile):
     353 +def writeCredentials(creds):
     354 + auth_as = options.use_admin if options.use_admin else options.email
     355 + cfgFile = os.path.join(getProgPath(), '%s.cfg' % auth_as)
    354 356   creds_data = {
    355 357   'token': creds.token,
    356 358   'refresh_token': creds.refresh_token,
    skipped 1096 lines
    1453 1455   doCheckServiceAccount()
    1454 1456   sys.exit(0)
    1455 1457   if not options.service_account: # 3-Legged OAuth
    1456  - requestOAuthAccess()
     1458 + getValidOauth2TxtCredentials()
    1457 1459   if not doesTokenMatchEmail():
    1458 1460   sys.exit(9)
    1459 1461   gmail = buildGAPIObject('gmail')
    skipped 666 lines
Please wait...
Page is in error, reload to recover