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):
self.image = image
self.stderr = stderr
if stderr is None:
msg = ("Command '{}' in image '{}' returned non-zero exit "
"status {}").format(command, image, exit_status, stderr)
else:
msg = ("Command '{}' in image '{}' returned non-zero exit "
"status {}: {}").format(command, image, exit_status, stderr)
err = ": {}".format(stderr) if stderr is not None else ""
msg = ("Command '{}' in image '{}' returned non-zero exit "
"status {}{}").format(command, image, exit_status, err)
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