summaryrefslogtreecommitdiff
path: root/Crypto.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Crypto.hs')
-rw-r--r--Crypto.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Crypto.hs b/Crypto.hs
index 53cd48dd5..42f138950 100644
--- a/Crypto.hs
+++ b/Crypto.hs
@@ -238,10 +238,8 @@ configKeyIds c = do
keyIdField s = (split ":" s) !! 4
configGet :: RemoteConfig -> String -> String
-configGet c key =
- case M.lookup key c of
- Just v -> v
- Nothing -> error $ "missing " ++ key ++ " in remote config"
+configGet c key = maybe missing id $ M.lookup key c
+ where missing = error $ "missing " ++ key ++ " in remote config"
hmacWithCipher :: Cipher -> String -> String
hmacWithCipher c = hmacWithCipher' (cipherHmac c)