[PR #8822/7e978c77 backport][stable-9] use dict comprehension in plugins, part 2 (#8832)

use dict comprehension in plugins, part 2 (#8822)

* use dict comprehension in plugins

* add changelog frag

(cherry picked from commit 7e978c77b4)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-09-05 22:01:56 +02:00 committed by GitHub
parent 19613ce111
commit 7c3b441246
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 76 additions and 68 deletions

View file

@ -185,8 +185,7 @@ def get_token(module_params):
'password': auth_password,
}
# Remove empty items, for instance missing client_secret
payload = dict(
(k, v) for k, v in temp_payload.items() if v is not None)
payload = {k: v for k, v in temp_payload.items() if v is not None}
try:
r = json.loads(to_native(open_url(auth_url, method='POST',
validate_certs=validate_certs, http_agent=http_agent, timeout=connection_timeout,