Replace irrefutible pattern by error master
authorJoachim Breitner <mail@joachim-breitner.de>
Fri, 31 Aug 2012 09:22:59 +0000 (09:22 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Fri, 31 Aug 2012 09:22:59 +0000 (09:22 +0000)
src/Darcs/Watch/ImportMail.hs

index 7d80168..b786772 100644 (file)
@@ -55,7 +55,7 @@ importMail config  = do
            emailSource = ViaEMail from to subject mid
        case mpatch of
                Just bundleData -> do
-                       let Right bundle = scan_bundle (B.pack bundleData)
+                       let bundle = either error id $ scan_bundle (B.pack bundleData)
                            roundupURL = findRoundupURL message
                        bhash <- addBundle (cData config) bundle
                        case roundupURL of