mirror of
https://gitea.elkins.co/Networking/ccl.git
synced 2025-03-09 12:41:40 -05:00
fix error on ls when container not defined
This commit is contained in:
parent
603d23bcf9
commit
03aa6c8d1b
@ -526,6 +526,9 @@ func (c *Container) GetStats() *define.ContainerStats {
|
||||
fmt.Fprintf(os.Stderr, "containers.stats returned error in the channel (%s): %s\n", c.Name, report.Error)
|
||||
break
|
||||
}
|
||||
if len(report.Stats) == 0 {
|
||||
return nil
|
||||
}
|
||||
return &report.Stats[0]
|
||||
case <-time.After(250 * time.Millisecond):
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user