Merge pull request #237 from crosbymichael/create-status

Use state for container create
This commit is contained in:
Kenfe-Mickaël Laventure 2016-05-09 14:55:08 -07:00
commit 57b7c3da91

View file

@ -262,11 +262,7 @@ func createAPIContainer(c runtime.Container, getPids bool) (*types.Container, er
procs = append(procs, proc)
}
var pids []int
state, err := c.Status()
if err != nil {
return nil, grpc.Errorf(codes.Internal, "get status for container: "+err.Error())
}
state := c.State()
if getPids && (state == runtime.Running || state == runtime.Paused) {
if pids, err = c.Pids(); err != nil {
return nil, grpc.Errorf(codes.Internal, "get all pids for container: "+err.Error())