Catch does not exist error

There was a new line at the end of does not exist
which was causing this to fail.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #863
Approved by: baude
This commit is contained in:
Daniel J Walsh 2018-05-31 15:22:40 -04:00 committed by Atomic Bot
parent 4dfe0d60f3
commit d6b8f62dd6
1 changed files with 1 additions and 1 deletions

View File

@ -423,7 +423,7 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container) error {
out, err := exec.Command(r.path, "state", ctr.ID()).CombinedOutput()
if err != nil {
if strings.HasSuffix(string(out), "does not exist") {
if strings.Contains(string(out), "does not exist") {
ctr.removeConmonFiles()
ctr.state.State = ContainerStateConfigured
return nil