Merge pull request #237 from crosbymichael/create-status
Use state for container create
This commit is contained in:
commit
57b7c3da91
1 changed files with 1 additions and 5 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Reference in a new issue