mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +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:
@@ -284,7 +284,7 @@ import os
|
||||
import traceback
|
||||
import typing as t
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.module_utils.common.text.formatters import human_to_bytes
|
||||
|
||||
from ansible_collections.community.docker.plugins.module_utils._api.utils.utils import (
|
||||
@@ -545,12 +545,12 @@ class ImageBuilder(DockerBaseClass):
|
||||
if rc != 0:
|
||||
self.fail(
|
||||
f"Building {self.name}:{self.tag} failed",
|
||||
stdout=to_native(stdout),
|
||||
stderr=to_native(stderr),
|
||||
stdout=to_text(stdout),
|
||||
stderr=to_text(stderr),
|
||||
command=args,
|
||||
)
|
||||
results["stdout"] = to_native(stdout)
|
||||
results["stderr"] = to_native(stderr)
|
||||
results["stdout"] = to_text(stdout)
|
||||
results["stderr"] = to_text(stderr)
|
||||
results["image"] = self.client.find_image(self.name, self.tag) or {}
|
||||
results["command"] = args
|
||||
|
||||
|
||||
Reference in New Issue
Block a user