check err and add print

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
This commit is contained in:
yupengzte 2017-05-05 14:03:38 +08:00
parent 118d4ee123
commit 130d1491b7
1 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,6 @@ func (daemon *Daemon) CheckpointCreate(name string, config types.CheckpointCreat
}
checkpointDir, err := getCheckpointDir(config.CheckpointDir, config.CheckpointID, name, container.ID, container.CheckpointDir(), true)
if err != nil {
return fmt.Errorf("cannot checkpoint container %s: %s", name, err)
}
@ -105,6 +104,9 @@ func (daemon *Daemon) CheckpointList(name string, config types.CheckpointListOpt
}
checkpointDir, err := getCheckpointDir(config.CheckpointDir, "", name, container.ID, container.CheckpointDir(), true)
if err != nil {
return nil, err
}
if err := os.MkdirAll(checkpointDir, 0755); err != nil {
return nil, err