Skip to content
Snippets Groups Projects
Commit 1cf97474 authored by Iustin Pop's avatar Iustin Pop
Browse files

Change ExtLoader to only handle I/O errors

Due to the Control.Exception changes between 6.8 and 6.10, using it
portably is difficult. Since we're only interested in handling I/O
errors, we can use prelude's catch and not have to deal with
Control.Exception at all.

The use in Luxi.hs where we just use bracket is fine across the two
versions, so we keep that.
parent cf924b6d
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,6 @@ module Ganeti.HTools.ExtLoader
( loadExternalData
) where
import Control.Exception
import Data.Maybe (isJust, fromJust)
import Monad
import System.Posix.Env
......@@ -65,7 +64,7 @@ parseEnv () = do
-- | Error beautifier
wrapIO :: IO (Result a) -> IO (Result a)
wrapIO = handle (return . Bad . show)
wrapIO = flip catch (return . Bad . show)
-- | External tool data loader from a variety of sources.
loadExternalData :: Options
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment