mirror of
https://github.com/containers/podman.git
synced 2025-06-28 22:53:21 +08:00
Do not print error message when container does not exist
This fixes a condition when a container is removed while following the logs and prints an error when the container is removed forcefully. Signed-off-by: jgallucci32 <john.gallucci.iv@gmail.com>
This commit is contained in:
@ -78,9 +78,11 @@ func (c *Container) readFromLogFile(options *logs.LogOptions, logChannel chan *l
|
||||
if options.Follow {
|
||||
for {
|
||||
state, err := c.State()
|
||||
if err != nil {
|
||||
if err != nil && errors.Cause(err) != define.ErrNoSuchCtr {
|
||||
logrus.Error(err)
|
||||
break
|
||||
} else if err != nil {
|
||||
break
|
||||
}
|
||||
if state != define.ContainerStateRunning && state != define.ContainerStatePaused {
|
||||
err := t.Stop()
|
||||
|
Reference in New Issue
Block a user