Revision 90eb468c

b/lib/utils.py
542 542
          beparams[item] = val
543 543
      if item in (constants.BE_AUTO_BALANCE):
544 544
        val = beparams[item]
545
        if val == constants.VALUE_TRUE:
546
          beparams[item] = True
547
        elif val == constants.VALUE_FALSE:
548
          beparams[item] = False
549
        else:
550
          raise errors.OpPrereqError("Invalid %s value: %s" % (item, val))
545
        if not isinstance(val, bool):
546
          if val == constants.VALUE_TRUE:
547
            beparams[item] = True
548
          elif val == constants.VALUE_FALSE:
549
            beparams[item] = False
550
          else:
551
            raise errors.OpPrereqError("Invalid %s value: %s" % (item, val))
551 552

  
552 553

  
553 554
def NiceSort(name_list):

Also available in: Unified diff