Revision 72747d91 src/Ganeti/HTools/Program/Hail.hs
b/src/Ganeti/HTools/Program/Hail.hs | ||
---|---|---|
4 | 4 |
|
5 | 5 |
{- |
6 | 6 |
|
7 |
Copyright (C) 2009, 2010, 2011, 2012 Google Inc. |
|
7 |
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
|
|
8 | 8 |
|
9 | 9 |
This program is free software; you can redistribute it and/or modify |
10 | 10 |
it under the terms of the GNU General Public License as published by |
... | ... | |
59 | 59 |
|
60 | 60 |
wrapReadRequest :: Options -> [String] -> IO Request |
61 | 61 |
wrapReadRequest opts args = do |
62 |
when (null args) $ exitErr "This program needs an input file." |
|
62 |
r1 <- case args of |
|
63 |
[] -> exitErr "This program needs an input file." |
|
64 |
_:_:_ -> exitErr "Only one argument is accepted (the input file)" |
|
65 |
x:_ -> readRequest x |
|
63 | 66 |
|
64 |
r1 <- readRequest (head args) |
|
65 | 67 |
if isJust (optDataFile opts) || (not . null . optNodeSim) opts |
66 | 68 |
then do |
67 | 69 |
cdata <- loadExternalData opts |
Also available in: Unified diff