summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorjgallucci32 <john.gallucci.iv@gmail.com>2020-06-12 12:59:58 -0700
committerjgallucci32 <john.gallucci.iv@gmail.com>2020-06-12 12:59:58 -0700
commitd514e3c09705c64b6cbcef70216a6edea9c8515a (patch)
tree108ddac4ff298015aaed7105ecbd09ce50a00652 /libpod
parente7143525011610af8e487e3d9ae63e533b27e4fe (diff)
downloadpodman-d514e3c09705c64b6cbcef70216a6edea9c8515a.tar.gz
podman-d514e3c09705c64b6cbcef70216a6edea9c8515a.tar.bz2
podman-d514e3c09705c64b6cbcef70216a6edea9c8515a.zip
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>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_log.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/container_log.go b/libpod/container_log.go
index da3ed3113..769f776d0 100644
--- a/libpod/container_log.go
+++ b/libpod/container_log.go
@@ -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()