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:
@@ -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
|
||||
|
Reference in New Issue
Block a user