Revision c8bde61e lib/client/gnt_instance.py

b/lib/client/gnt_instance.py
660 660
  except (TypeError, ValueError), err:
661 661
    raise errors.OpPrereqError("Invalid disk index: %s" % str(err),
662 662
                               errors.ECODE_INVAL)
663
  amount = utils.ParseUnit(args[2])
663
  try:
664
    amount = utils.ParseUnit(args[2])
665
  except errors.UnitParseError:
666
    raise errors.OpPrereqError("Can't parse the given amount '%s'" % args[2],
667
                               errors.ECODE_INVAL)
664 668
  op = opcodes.OpInstanceGrowDisk(instance_name=instance,
665 669
                                  disk=disk, amount=amount,
666 670
                                  wait_for_sync=opts.wait_for_sync,

Also available in: Unified diff