mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Improve language.
This commit is contained in:
@@ -353,7 +353,7 @@ class DockerAPIEngineDriver(EngineDriver):
|
||||
except APIError as exc:
|
||||
if 'Unpause the container before stopping or killing' in exc.explanation:
|
||||
# New docker daemon versions do not allow containers to be removed
|
||||
# if they are paused. Make sure we don't end up in an infinite loop.
|
||||
# if they are paused. Make sure we do not end up in an infinite loop.
|
||||
if count == 3:
|
||||
raise Exception('%s [tried to unpause three times]' % to_native(exc))
|
||||
count += 1
|
||||
@@ -379,7 +379,7 @@ class DockerAPIEngineDriver(EngineDriver):
|
||||
except APIError as exc:
|
||||
if 'Unpause the container before stopping or killing' in exc.explanation:
|
||||
# New docker daemon versions do not allow containers to be removed
|
||||
# if they are paused. Make sure we don't end up in an infinite loop.
|
||||
# if they are paused. Make sure we do not end up in an infinite loop.
|
||||
if count == 3:
|
||||
raise Exception('%s [tried to unpause three times]' % to_native(exc))
|
||||
count += 1
|
||||
@@ -802,7 +802,7 @@ def _get_image_labels(image):
|
||||
if not image:
|
||||
return {}
|
||||
|
||||
# Can't use get('Labels', {}) because 'Labels' may be present and be None
|
||||
# Cannot use get('Labels', {}) because 'Labels' may be present and be None
|
||||
return image['Config'].get('Labels') or {}
|
||||
|
||||
|
||||
@@ -1267,7 +1267,7 @@ def _preprocess_container_names(module, client, api_version, value):
|
||||
# name (and in the latter case, retrieve its ID)
|
||||
container = client.get_container(container_name)
|
||||
if container is None:
|
||||
# If we can't find the container, issue a warning and continue with
|
||||
# If we cannot find the container, issue a warning and continue with
|
||||
# what the user specified.
|
||||
module.warn('Cannot find a container with name or ID "{0}"'.format(container_name))
|
||||
return value
|
||||
|
||||
@@ -461,7 +461,7 @@ class ContainerManager(DockerBaseClass):
|
||||
self.results['changed'] = True
|
||||
self.results['actions'].append(dict(pulled_image="%s:%s" % (repository, tag), changed=True))
|
||||
elif not image or self.param_pull_check_mode_behavior == 'always':
|
||||
# If the image isn't there, or pull_check_mode_behavior == 'always', claim we'll
|
||||
# If the image is not there, or pull_check_mode_behavior == 'always', claim we'll
|
||||
# pull. (Implicitly: if the image is there, claim it already was latest unless
|
||||
# pull_check_mode_behavior == 'always'.)
|
||||
self.results['changed'] = True
|
||||
|
||||
Reference in New Issue
Block a user