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:
parent
9a7b4d7172
commit
1bd3b70de6
5 changed files with 26 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue