mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
use dict comprehension in plugins, part 2 (#8822)
* use dict comprehension in plugins * add changelog frag
This commit is contained in:
parent
ecc048bc12
commit
7e978c77b4
21 changed files with 76 additions and 68 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue