summaryrefslogtreecommitdiff
path: root/Remote/Bup.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-05-15 02:49:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-05-15 03:38:08 -0400
commitcad0e1c8b7eb21f8dceca8dd9fa3bc1d1aa7eabd (patch)
treeb6be12dc1cc83a35ca7d89a862d85e6d71c38572 /Remote/Bup.hs
parentefa7f544050c0d5be6bc1b0fc0125278e475c213 (diff)
simplified a bunch of Maybe handling
Diffstat (limited to 'Remote/Bup.hs')
-rw-r--r--Remote/Bup.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs
index 0aaff06b2..d2b771bf7 100644
--- a/Remote/Bup.hs
+++ b/Remote/Bup.hs
@@ -68,9 +68,8 @@ gen r u c = do
bupSetup :: UUID -> RemoteConfig -> Annex RemoteConfig
bupSetup u c = do
-- verify configuration is sane
- let buprepo = case M.lookup "buprepo" c of
- Nothing -> error "Specify buprepo="
- Just r -> r
+ let buprepo = maybe (error "Specify buprepo=") id $
+ M.lookup "buprepo" c
c' <- encryptionSetup c
-- bup init will create the repository.