diff options
| author | Mario Lang <mlang@delysid.org> | 2015-09-13 00:46:49 +0200 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-09-13 13:21:41 -0400 |
| commit | b84c9bbb7c9db688118ad756c1c43ef034fd98fb (patch) | |
| tree | 61d50f50f58714e9df2390c337fa7bb2ff34d3ea /src/Propellor/Property/Docker.hs | |
| parent | 2af70d4ac7ff25a3e596de195abe40db46c74074 (diff) | |
Follow some hlint suggestions.
Diffstat (limited to 'src/Propellor/Property/Docker.hs')
| -rw-r--r-- | src/Propellor/Property/Docker.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs index e24d58d4..fc12cf8c 100644 --- a/src/Propellor/Property/Docker.hs +++ b/src/Propellor/Property/Docker.hs @@ -213,7 +213,7 @@ garbageCollected = propertyList "docker garbage collected" where gccontainers = property "docker containers garbage collected" $ liftIO $ report <$> (mapM removeContainer =<< listContainers AllContainers) - gcimages = property "docker images garbage collected" $ do + gcimages = property "docker images garbage collected" $ liftIO $ report <$> (mapM removeImage =<< listImages) -- | Tweaks a container to work well with docker. @@ -471,8 +471,7 @@ runningContainer cid@(ContainerId hn cn) image runps = containerDesc cid $ prope restartcontainer = do oldimage <- liftIO $ - fromMaybe (toImageID image) . fmap toImageID <$> - commitContainer cid + maybe (toImageID image) toImageID <$> commitContainer cid void $ liftIO $ removeContainer cid go oldimage @@ -631,8 +630,8 @@ data ContainerFilter = RunningContainers | AllContainers -- | Only lists propellor managed containers. listContainers :: ContainerFilter -> IO [ContainerId] listContainers status = - catMaybes . map toContainerId . concat . map (split ",") - . catMaybes . map (lastMaybe . words) . lines + (mapMaybe toContainerId . concatMap (split ",") + . mapMaybe (lastMaybe . words) . lines) <$> readProcess dockercmd ps where ps |
