Skip to content

Commit

Permalink
fix: avoid deleting items while iterating (#772)
Browse files Browse the repository at this point in the history
Updates `google.auth.external_account.Credentials#info` to not delete items in the dictionary while iterating.
  • Loading branch information
bojeil-google committed Jun 9, 2021
1 parent f97499c commit a5e6b65
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions google/auth/external_account.py
Expand Up @@ -142,12 +142,7 @@ def info(self):
"client_id": self._client_id,
"client_secret": self._client_secret,
}
# Remove None fields in the info dictionary.
for k, v in dict(config_info).items():
if v is None:
del config_info[k]

return config_info
return {key: value for key, value in config_info.items() if value is not None}

@property
def service_account_email(self):
Expand Down

0 comments on commit a5e6b65

Please sign in to comment.