diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-04-01 19:45:23 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-05-03 10:36:16 -0400 |
commit | 7ba1b609aad678f458951c978455ea44c5b4d3ec (patch) | |
tree | cd9b6322c44fbb15579ff40f3ca33ea8d63285a1 /libpod/container_internal.go | |
parent | 357e4c37e92e7426a66f1a1142a9650bb0d81ca0 (diff) | |
download | podman-7ba1b609aad678f458951c978455ea44c5b4d3ec.tar.gz podman-7ba1b609aad678f458951c978455ea44c5b4d3ec.tar.bz2 podman-7ba1b609aad678f458951c978455ea44c5b4d3ec.zip |
Move to using constants for valid restart policy types
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index b1b7a090f..76de37a09 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -275,7 +275,7 @@ func (c *Container) syncContainer() error { // Only save back to DB if state changed if c.state.State != oldState { // Check for a restart policy match - if c.config.RestartPolicy != "" && c.config.RestartPolicy != "no" && + if c.config.RestartPolicy != RestartPolicyNone && c.config.RestartPolicy != RestartPolicyNo && (oldState == ContainerStateRunning || oldState == ContainerStatePaused) && (c.state.State == ContainerStateStopped || c.state.State == ContainerStateExited) && !c.state.StoppedByUser { |