From 1a67a86310aaab9eb010de58b61557924707dcd5 Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 16 Apr 2014 01:41:58 -0400 Subject: removed rtRings and rtWallets --- KeyRing.hs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/KeyRing.hs b/KeyRing.hs index 798ad38..ad9f45a 100644 --- a/KeyRing.hs +++ b/KeyRing.hs @@ -94,8 +94,6 @@ getUsage _ = mzero data KeyRingRuntime = KeyRingRuntime { rtPubring :: FilePath , rtSecring :: FilePath - , rtRings :: [FilePath] - , rtWallets :: [FilePath] , rtGrip :: Maybe String , rtKeyDB :: KeyDB } @@ -910,6 +908,9 @@ runKeyRing :: KeyRingData -> (KeyRingRuntime -> a) -> IO (KikiResult a) runKeyRing keyring op = do homedir <- getHomeDir (homeSpec keyring) let try' :: KikiCondition a -> (a -> IO (KikiResult b)) -> IO (KikiResult b) + -- FIXME: try' should probably accept a list of KikiReportActions. + -- This would be useful for reporting on disk writes that have already + -- succeded prior to this termination. try' v body = case functorToEither v of Left e -> return $ KikiResult e [] @@ -951,8 +952,6 @@ runKeyRing keyring op = do a <- return $ op KeyRingRuntime { rtPubring = pubring , rtSecring = secring - , rtRings = [] -- todo secring:pubring:keyringFiles keyring - , rtWallets = [] -- todo walletFiles keyring , rtGrip = grip , rtKeyDB = db } @@ -963,7 +962,7 @@ runKeyRing keyring op = do r <- writeRingKeys keyring db wk secring pubring try' r $ \report_rings -> do - -- writePEMKeys + -- todo writePEMKeys return $ KikiResult (KikiSuccess a) $ concat [ report_externals @@ -971,8 +970,7 @@ runKeyRing keyring op = do , report_wallets , report_rings ] - forM_ lked $ \(Just lk, fname) -> do dotlock_release lk - dotlock_destroy lk -- todo: verify we want this + forM_ lked $ \(Just lk, fname) -> dotlock_release lk return ret -- cgit v1.2.3