Kaydet (Commit) f3374959 authored tarafından Joffrey F's avatar Joffrey F Kaydeden (comit) Joffrey F

Improve ContainerError message compute

Signed-off-by: 's avatarJoffrey F <joffrey@docker.com>
üst 62fda980
...@@ -128,12 +128,9 @@ class ContainerError(DockerException): ...@@ -128,12 +128,9 @@ class ContainerError(DockerException):
self.image = image self.image = image
self.stderr = stderr self.stderr = stderr
if stderr is None: err = ": {}".format(stderr) if stderr is not None else ""
msg = ("Command '{}' in image '{}' returned non-zero exit " msg = ("Command '{}' in image '{}' returned non-zero exit "
"status {}").format(command, image, exit_status, stderr) "status {}{}").format(command, image, exit_status, err)
else:
msg = ("Command '{}' in image '{}' returned non-zero exit "
"status {}: {}").format(command, image, exit_status, stderr)
super(ContainerError, self).__init__(msg) super(ContainerError, self).__init__(msg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment