diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-16 17:44:59 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-16 17:44:59 -0400 |
commit | b3e5590fb2995d73d5e69a3954fcb11d9fe98d28 (patch) | |
tree | f539153d536c4ffaf611a610e1f6452d597160da /Remotes.hs | |
parent | 91c9cd2b8eb9934eebf9a20adde7794a103d144a (diff) |
update
Diffstat (limited to 'Remotes.hs')
-rw-r--r-- | Remotes.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Remotes.hs b/Remotes.hs index 3774f993c..f21f5a6ba 100644 --- a/Remotes.hs +++ b/Remotes.hs @@ -6,8 +6,8 @@ module Remotes ( tryGitConfigRead ) where +import Control.Exception import Control.Monad.State (liftIO) -import IO import qualified Data.Map as Map import Data.String.Utils import List @@ -85,7 +85,9 @@ tryGitConfigRead :: Git.Repo -> Annex (Maybe Git.Repo) tryGitConfigRead r = do if (Map.null $ Git.configMap r) then do - result <- liftIO $ try (Git.configRead r) + -- configRead can fail due to IO error or + -- for other reasons; catch all possible exceptions + result <- liftIO $ (try (Git.configRead r)::IO (Either SomeException (Git.Repo))) case (result) of Left err -> return Nothing Right r' -> do |