1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

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 <long.wanglong@huawei.com>
This commit is contained in:
Wang Long
2016-02-03 20:24:12 +08:00
parent 9187ed724d
commit db49753d1a

View File

@@ -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