Revision f8e7ddca

b/scripts/gnt-cluster
69 69
             (opts.default_hypervisor, hvlist))
70 70
    return 1
71 71

  
72
  hvparams = opts.hvparams
73
  if hvparams:
74
    # a list of (name, dict) we can pass directly to dict()
75
    hvparams = dict(opts.hvparams)
76
  else:
77
    # otherwise init as empty dict
78
    hvparams = {}
72
  hvparams = dict(opts.hvparams)
79 73

  
80 74
  beparams = opts.beparams
81 75
  # check for invalid parameters
......
473 467
  if hvlist is not None:
474 468
    hvlist = hvlist.split(",")
475 469

  
476
  hvparams = opts.hvparams
477
  if hvparams:
478
    # a list of (name, dict) we can pass directly to dict()
479
    hvparams = dict(opts.hvparams)
470
  # a list of (name, dict) we can pass directly to dict() (or [])
471
  hvparams = dict(opts.hvparams)
480 472
  for hv, hv_params in hvparams.iteritems():
481 473
    utils.ForceDictType(hv_params, constants.HVS_PARAMETER_TYPES)
482 474

  

Also available in: Unified diff