mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 03:46:55 +00:00
Python code modernization, 8/n (#1179)
* Use to_text instead of to_native. * Remove no longer needed pylint ignores. * Remove another pylint ignore. * Remove no longer needed ignore. * Address redefined-outer-name. * Address consider-using-with.
This commit is contained in:
@@ -85,7 +85,7 @@ EXAMPLES = r"""
|
||||
import json
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
from ansible_collections.community.docker.plugins.module_utils._common_cli import (
|
||||
AnsibleModuleDockerClient,
|
||||
@@ -108,7 +108,7 @@ def main() -> None:
|
||||
changed=False,
|
||||
rc=rc,
|
||||
stdout="\n".join([json.dumps(entry) for entry in ret]),
|
||||
stderr=to_native(stderr).strip(),
|
||||
stderr=to_text(stderr).strip(),
|
||||
results=ret,
|
||||
)
|
||||
except DockerException as e:
|
||||
|
||||
Reference in New Issue
Block a user