This commit is contained in:
Joey Hess 2011-08-21 13:17:12 -04:00
parent 1c25df3c1b
commit 06ce574136
2 changed files with 5 additions and 6 deletions

View file

@ -51,11 +51,10 @@ remoteCost r def = do
else getConfig r "cost" ""
where
safeparse v
| null ws || null ps = def
| otherwise = (fst . head) ps
| null ws = def
| otherwise = fromMaybe def $ readMaybe $ head ws
where
ws = words v
ps = reads $ head ws
cheapRemoteCost :: Int
cheapRemoteCost = 100