summaryrefslogtreecommitdiff
path: root/Annex/Ssh.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-02-03 16:47:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-02-03 16:47:24 -0400
commit146c36ca545a297f1e44e3cf2c91f3c0e17c909f (patch)
tree56d6fb274427bb793155182aed7e92e2e00895ba /Annex/Ssh.hs
parent05f89123e08075cfbd136f37c60423c1ad38d1fe (diff)
IO exception rework
ghc 7.4 comaplains about use of System.IO.Error to catch exceptions. Ok, use Control.Exception, with variants specialized to only catch IO exceptions.
Diffstat (limited to 'Annex/Ssh.hs')
-rw-r--r--Annex/Ssh.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index 14ea74e53..d6f36e868 100644
--- a/Annex/Ssh.hs
+++ b/Annex/Ssh.hs
@@ -11,7 +11,6 @@ module Annex.Ssh (
) where
import qualified Data.Map as M
-import System.IO.Error (try)
import Common.Annex
import Annex.LockPool
@@ -72,7 +71,8 @@ sshCleanup = do
let lockfile = socket2lock socketfile
unlockFile lockfile
fd <- liftIO $ openFd lockfile ReadWrite (Just stdFileMode) defaultFileFlags
- v <- liftIO $ try $ setLock fd (WriteLock, AbsoluteSeek, 0, 0)
+ v <- liftIO $ tryIO $
+ setLock fd (WriteLock, AbsoluteSeek, 0, 0)
case v of
Left _ -> return ()
Right _ -> stopssh socketfile