summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-04 15:23:09 -0400
committerJoey Hess2014-04-04 15:23:09 -0400
commitbbca48d44bdecc7698a7c05a5d2d3f64c925a96e (patch)
tree86543f90c4fe2520aaa76f376407ad555168333f /Propellor/Property
parentd902a4924b6d8da24bea00b119793f90c88b238a (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Docker.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index 8d8cc1eb..9bdf3e54 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -241,9 +241,10 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
ident = ContainerIdent image hn cn runps
getrunningident :: IO (Maybe ContainerIdent)
- getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $ \rs -> do
- print (rs, extractident rs)
- return $ extractident rs
+ getrunningident = catchDefaultIO Nothing $
+ simpleShClient (namedPipe cid) "cat" [propellorIdent] $ \rs -> do
+ print (rs, extractident rs)
+ return $ extractident rs
extractident :: [Resp] -> Maybe ContainerIdent
extractident = headMaybe . catMaybes . map (readish :: String -> Maybe ContainerIdent) . catMaybes . map getStdout