noop
This commit is contained in:
parent
bee420bd2d
commit
ed79596b75
27 changed files with 56 additions and 52 deletions
|
@ -195,7 +195,8 @@ meteredWriteFile' meterupdate dest startstate feeder =
|
|||
where
|
||||
feed state [] h = do
|
||||
(state', cs) <- feeder state
|
||||
if null cs then return () else feed state' cs h
|
||||
unless (null cs) $
|
||||
feed state' cs h
|
||||
feed state (c:cs) h = do
|
||||
S.hPut h c
|
||||
meterupdate $ toInteger $ S.length c
|
||||
|
|
|
@ -46,7 +46,7 @@ runHooks r starthook stophook a = do
|
|||
a
|
||||
where
|
||||
remoteid = show (uuid r)
|
||||
run Nothing = return ()
|
||||
run Nothing = noop
|
||||
run (Just command) = void $ liftIO $
|
||||
boolSystem "sh" [Param "-c", Param command]
|
||||
firstrun lck = do
|
||||
|
@ -81,7 +81,7 @@ runHooks r starthook stophook a = do
|
|||
v <- liftIO $ tryIO $
|
||||
setLock fd (WriteLock, AbsoluteSeek, 0, 0)
|
||||
case v of
|
||||
Left _ -> return ()
|
||||
Left _ -> noop
|
||||
Right _ -> run stophook
|
||||
liftIO $ closeFd fd
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ s3Setup u c = handlehost $ M.lookup "host" c
|
|||
|
||||
archiveorg = do
|
||||
showNote "Internet Archive mode"
|
||||
maybe (error "specify bucket=") (const $ return ()) $
|
||||
maybe (error "specify bucket=") (const noop) $
|
||||
M.lookup "bucket" archiveconfig
|
||||
use archiveconfig
|
||||
where
|
||||
|
@ -237,13 +237,13 @@ genBucket c = do
|
|||
showAction "checking bucket"
|
||||
loc <- liftIO $ getBucketLocation conn bucket
|
||||
case loc of
|
||||
Right _ -> return ()
|
||||
Right _ -> noop
|
||||
Left err@(NetworkError _) -> s3Error err
|
||||
Left (AWSError _ _) -> do
|
||||
showAction $ "creating bucket in " ++ datacenter
|
||||
res <- liftIO $ createBucketIn conn bucket datacenter
|
||||
case res of
|
||||
Right _ -> return ()
|
||||
Right _ -> noop
|
||||
Left err -> s3Error err
|
||||
where
|
||||
bucket = fromJust $ M.lookup "bucket" c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue