Use dict comprehension instead (#83680)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/84039/head
Abhijeet Kasurde 1 month ago committed by GitHub
parent 671c797aa1
commit 279de623d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1433,11 +1433,7 @@ class AnsibleModule(object):
kwargs['deprecations'] = deprecations
# preserve bools/none from no_log
# TODO: once python version on target high enough, dict comprehensions
preserved = {}
for k, v in kwargs.items():
if v is None or isinstance(v, bool):
preserved[k] = v
preserved = {k: v for k, v in kwargs.items() if v is None or isinstance(v, bool)}
# strip no_log collisions
kwargs = remove_values(kwargs, self.no_log_values)

Loading…
Cancel
Save