From db49753d1a2f6a72a9f3e50eb243a09a5a5bdc4a Mon Sep 17 00:00:00 2001 From: Wang Long Date: Wed, 3 Feb 2016 20:24:12 +0800 Subject: [PATCH] do not print success info when loading images error when the client.LoadImage return an error, there should not be print success info like the following: "INFO[0000] Done loading images from /usr/share/ros/images.tar" This patch fix it by move the log.Infof() after the err check. Signed-off-by: Wang Long --- init/sysinit.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init/sysinit.go b/init/sysinit.go index 38103da6..b5596a47 100644 --- a/init/sysinit.go +++ b/init/sysinit.go @@ -79,11 +79,11 @@ func loadImages(cfg *config.CloudConfig) (*config.CloudConfig, error) { err = client.LoadImage(dockerClient.LoadImageOptions{ InputStream: input, }) - log.Infof("Done loading images from %s", inputFileName) - if err != nil { return cfg, err } + + log.Infof("Done loading images from %s", inputFileName) } return cfg, nil