mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-09-12 19:07:24 +00:00
Improve language.
This commit is contained in:
@@ -21,7 +21,7 @@ from ansible_collections.community.docker.plugins.module_utils.version import Lo
|
||||
try:
|
||||
from requests.exceptions import RequestException, SSLError # noqa: F401, pylint: disable=unused-import
|
||||
except ImportError:
|
||||
# Define an exception class RequestException so that our code doesn't break.
|
||||
# Define an exception class RequestException so that our code does not break.
|
||||
class RequestException(Exception):
|
||||
pass
|
||||
|
||||
@@ -366,7 +366,7 @@ class AnsibleDockerClientBase(Client):
|
||||
registry, repo_name = auth.resolve_repository_name(name)
|
||||
if registry == 'docker.io':
|
||||
# If docker.io is explicitly there in name, the image
|
||||
# isn't found in some cases (#41509)
|
||||
# is not found in some cases (#41509)
|
||||
self.log("Check for docker.io image: %s" % repo_name)
|
||||
images = self._image_lookup(repo_name, tag)
|
||||
if not images and repo_name.startswith('library/'):
|
||||
@@ -375,8 +375,8 @@ class AnsibleDockerClientBase(Client):
|
||||
self.log("Check for docker.io image: %s" % lookup)
|
||||
images = self._image_lookup(lookup, tag)
|
||||
if not images:
|
||||
# Last case for some Docker versions: if docker.io wasn't there,
|
||||
# it can be that the image wasn't found either
|
||||
# Last case for some Docker versions: if docker.io was not there,
|
||||
# it can be that the image was not found either
|
||||
# (https://github.com/ansible/ansible/pull/15586)
|
||||
lookup = "%s/%s" % (registry, repo_name)
|
||||
self.log("Check for docker.io image: %s" % lookup)
|
||||
|
||||
Reference in New Issue
Block a user