summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/containers.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-27 10:33:30 -0500
committerGitHub <noreply@github.com>2021-01-27 10:33:30 -0500
commitd8f34500088ed50264fba4a770699728099c474a (patch)
treec9afefa6d5237c2725aa2888cb3f0e480b3db3b2 /pkg/api/handlers/compat/containers.go
parent179b9d1745db19cb420b0a8f8d6afa4dfc07dd91 (diff)
parent21cb3043fcae3f9196a2faeddbaba891f9f3f49c (diff)
downloadpodman-d8f34500088ed50264fba4a770699728099c474a.tar.gz
podman-d8f34500088ed50264fba4a770699728099c474a.tar.bz2
podman-d8f34500088ed50264fba4a770699728099c474a.zip
Merge pull request #9095 from rhatdan/ps
podman-remote ps --external --pod --sort do not work.
Diffstat (limited to 'pkg/api/handlers/compat/containers.go')
-rw-r--r--pkg/api/handlers/compat/containers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go
index aa12afc82..0f91a4362 100644
--- a/pkg/api/handlers/compat/containers.go
+++ b/pkg/api/handlers/compat/containers.go
@@ -73,7 +73,7 @@ func RemoveContainer(w http.ResponseWriter, r *http.Request) {
utils.InternalServerError(w, err)
return
}
- if report[0].Err != nil {
+ if len(report) > 0 && report[0].Err != nil {
utils.InternalServerError(w, report[0].Err)
return
}