mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Python code modernization, 1/n (#1141)
* Remove unicode text prefixes. * Replace str.format() uses with f-strings. * Replace % with f-strings, and do some cleanup. * Fix wrong variable. * Avoid unnecessary string conversion.
This commit is contained in:
@@ -28,11 +28,11 @@ class ActionModule(ActionBase):
|
||||
|
||||
result = merge_hash(result, self._execute_module(task_vars=task_vars, wrap_async=self._task.async_val))
|
||||
|
||||
if u'diff' in result and result[u'diff'].get(u'scrambled_diff'):
|
||||
if 'diff' in result and result['diff'].get('scrambled_diff'):
|
||||
# Scrambling is not done for security, but to avoid no_log screwing up the diff
|
||||
diff = result[u'diff']
|
||||
key = base64.b64decode(diff.pop(u'scrambled_diff'))
|
||||
for k in (u'before', u'after'):
|
||||
diff = result['diff']
|
||||
key = base64.b64decode(diff.pop('scrambled_diff'))
|
||||
for k in ('before', 'after'):
|
||||
if k in diff:
|
||||
diff[k] = unscramble(diff[k], key)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user