summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/filters/containers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/domain/filters/containers.go b/pkg/domain/filters/containers.go
index 0557e75d6..3e5b9cad9 100644
--- a/pkg/domain/filters/containers.go
+++ b/pkg/domain/filters/containers.go
@@ -52,8 +52,8 @@ func GenerateContainerFilterFuncs(filter string, filterValues []string, r *libpo
}, nil
case "status":
for _, filterValue := range filterValues {
- if !util.StringInSlice(filterValue, []string{"created", "running", "paused", "stopped", "exited", "unknown"}) {
- return nil, errors.Errorf("%s is not a valid status", filterValue)
+ if _, err := define.StringToContainerStatus(filterValue); err != nil {
+ return nil, err
}
}
return func(c *libpod.Container) bool {