Revision debac808 scripts/gnt-cluster

b/scripts/gnt-cluster
280 280
  """
281 281
  filename = args[0]
282 282
  if not os.path.exists(filename):
283
    raise errors.OpPrereqError("No such filename '%s'" % filename)
283
    raise errors.OpPrereqError("No such filename '%s'" % filename,
284
                               errors.ECODE_INVAL)
284 285

  
285 286
  cl = GetClient()
286 287

  
......
550 551
      val = "unset"
551 552
    ToStdout("The drain flag is %s" % val)
552 553
  else:
553
    raise errors.OpPrereqError("Command '%s' is not valid." % command)
554
    raise errors.OpPrereqError("Command '%s' is not valid." % command,
555
                               errors.ECODE_INVAL)
554 556

  
555 557
  return 0
556 558

  
......
581 583

  
582 584
  elif command == "pause":
583 585
    if len(args) < 2:
584
      raise errors.OpPrereqError("Missing pause duration")
586
      raise errors.OpPrereqError("Missing pause duration", errors.ECODE_INVAL)
585 587

  
586 588
    result = client.SetWatcherPause(time.time() + ParseTimespec(args[1]))
587 589
    _ShowWatcherPause(result)
......
591 593
    _ShowWatcherPause(result)
592 594

  
593 595
  else:
594
    raise errors.OpPrereqError("Command '%s' is not valid." % command)
596
    raise errors.OpPrereqError("Command '%s' is not valid." % command,
597
                               errors.ECODE_INVAL)
595 598

  
596 599
  return 0
597 600

  

Also available in: Unified diff