Revision 707cd3d7 htools/Ganeti/HTools/Program/Hbal.hs
b/htools/Ganeti/HTools/Program/Hbal.hs | ||
---|---|---|
273 | 273 |
hPutStrLn stderr "Found multiple node groups:" |
274 | 274 |
mapM_ (hPutStrLn stderr . (" " ++) . Group.name . |
275 | 275 |
flip Container.find gl . fst) ngroups |
276 |
hPutStrLn stderr "Aborting." |
|
277 |
exitWith $ ExitFailure 1 |
|
276 |
exitErr "Aborting." |
|
278 | 277 |
|
279 | 278 |
case optGroup opts of |
280 | 279 |
Nothing -> do |
... | ... | |
286 | 285 |
hPutStrLn stderr $ "Node group " ++ g ++ |
287 | 286 |
" not found. Node group list is:" |
288 | 287 |
mapM_ (hPutStrLn stderr . (" " ++) . Group.name ) (Container.elems gl) |
289 |
hPutStrLn stderr "Aborting." |
|
290 |
exitWith $ ExitFailure 1 |
|
288 |
exitErr "Aborting." |
|
291 | 289 |
Just grp -> |
292 | 290 |
case lookup (Group.idx grp) ngroups of |
293 | 291 |
Nothing -> |
... | ... | |
350 | 348 |
-- | Main function. |
351 | 349 |
main :: Options -> [String] -> IO () |
352 | 350 |
main opts args = do |
353 |
unless (null args) $ do |
|
354 |
hPutStrLn stderr "Error: this program doesn't take any arguments." |
|
355 |
exitWith $ ExitFailure 1 |
|
351 |
unless (null args) $ exitErr "This program doesn't take any arguments." |
|
356 | 352 |
|
357 | 353 |
let verbose = optVerbose opts |
358 | 354 |
shownodes = optShowNodes opts |
Also available in: Unified diff