Revision 3603605a htools/Ganeti/HTools/CLI.hs
b/htools/Ganeti/HTools/CLI.hs | ||
---|---|---|
452 | 452 |
(o, n, []) -> |
453 | 453 |
do |
454 | 454 |
let (pr, args) = (foldM (flip id) defaultOptions o, n) |
455 |
po <- (case pr of
|
|
456 |
Bad msg -> do
|
|
457 |
hPutStrLn stderr "Error while parsing command\
|
|
458 |
\line arguments:"
|
|
459 |
hPutStrLn stderr msg
|
|
460 |
exitWith $ ExitFailure 1
|
|
461 |
Ok val -> return val)
|
|
455 |
po <- case pr of |
|
456 |
Bad msg -> do |
|
457 |
hPutStrLn stderr "Error while parsing command\ |
|
458 |
\line arguments:" |
|
459 |
hPutStrLn stderr msg |
|
460 |
exitWith $ ExitFailure 1 |
|
461 |
Ok val -> return val
|
|
462 | 462 |
when (optShowHelp po) $ do |
463 | 463 |
putStr $ usageHelp progname options |
464 | 464 |
exitWith ExitSuccess |
... | ... | |
534 | 534 |
m_cpu = optMcpu opts |
535 | 535 |
m_dsk = optMdsk opts |
536 | 536 |
|
537 |
when (not (null offline_wrong)) $ do
|
|
537 |
unless (null offline_wrong) $ do
|
|
538 | 538 |
hPrintf stderr "Error: Wrong node name(s) set as offline: %s\n" |
539 | 539 |
(commaJoin (map lrContent offline_wrong)) :: IO () |
540 | 540 |
exitWith $ ExitFailure 1 |
Also available in: Unified diff