Skip to content

Commit 0915dc1

Browse files
fix: avoid deleting items while iterating (#772)
Updates `google.auth.external_account.Credentials#info` to not delete items in the dictionary while iterating.
1 parent e909305 commit 0915dc1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/google-auth/google/auth/external_account.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,7 @@ def info(self):
142142
"client_id": self._client_id,
143143
"client_secret": self._client_secret,
144144
}
145-
# Remove None fields in the info dictionary.
146-
for k, v in dict(config_info).items():
147-
if v is None:
148-
del config_info[k]
149-
150-
return config_info
145+
return {key: value for key, value in config_info.items() if value is not None}
151146

152147
@property
153148
def service_account_email(self):

0 commit comments

Comments
 (0)