From 65d3f085dcd86c53549a3b126e0888f09c5e1925 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 18 Nov 2014 19:33:11 -0400 Subject: [PATCH] remove what should be dead code While old propellor's can emit Ready, they won't if they've managed to updateFirst. If updateFirst fails due to eg, inaccessiable central repo, those old propellor's are not able to receive inline git pushes anyway, so are not going to update no matter what, so no point in making --spin work in that case. --- src/Propellor/CmdLine.hs | 10 ---------- src/Propellor/Protocol.hs | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index df4d44a..66da633 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -233,16 +233,6 @@ spin hn hst = do hClose fromh sendGitClone hn comm cacheparams privdata - -- Ready is only sent by old versions of - -- propellor. They expect to get privdata, - -- and then no more protocol communication. - dispatch (Just Ready) = do - sendprivdata toh privdata - hClose toh - -- Display remaining output. - void $ tryIO $ forever $ - putStrLn =<< hGetLine fromh - hClose fromh dispatch Nothing = return () user = "root@"++hn diff --git a/src/Propellor/Protocol.hs b/src/Propellor/Protocol.hs index 7249e2b..f8b706c 100644 --- a/src/Propellor/Protocol.hs +++ b/src/Propellor/Protocol.hs @@ -9,7 +9,7 @@ import Data.List import Propellor -data Stage = Ready | NeedGitClone | NeedRepoUrl | NeedPrivData | NeedGitPush +data Stage = NeedGitClone | NeedRepoUrl | NeedPrivData | NeedGitPush deriving (Read, Show, Eq) type Marker = String