Revision f183de56 htools/Ganeti/HTools/IAlloc.hs

b/htools/Ganeti/HTools/IAlloc.hs
347 347
-- | Reads the request from the data file(s).
348 348
readRequest :: FilePath -> IO Request
349 349
readRequest fp = do
350
  input_data <- readFile fp
350
  input_data <- case fp of
351
                  "-" -> getContents
352
                  _   -> readFile fp
351 353
  case parseData input_data of
352 354
    Bad err -> do
353 355
      hPutStrLn stderr $ "Error: " ++ err

Also available in: Unified diff