1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

fix diff calculation for lower/upper cases (#115)

* fix diff calculation

* fix formatting

* fix formatting

* removed unused import statements

* add missing requirement doc
This commit is contained in:
Holger Hees 2020-10-07 10:50:43 +02:00 committed by GitHub
parent 9a7b4d7172
commit 1bd3b70de6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 12 deletions

View file

@ -17,3 +17,12 @@ def run_podman_command(module, executable='podman', args=None, expected_rc=0, ig
msg='Failed to run {command} {args}: {err}'.format(
command=command, args=args, err=err))
return rc, out, err
def lower_keys(x):
if isinstance(x, list):
return [lower_keys(v) for v in x]
elif isinstance(x, dict):
return dict((k.lower(), lower_keys(v)) for k, v in x.items())
else:
return x