Revision ff6c5e55 lib/config.py
b/lib/config.py | ||
---|---|---|
439 | 439 |
_helper(owner, fullkey, value, constants.ISPECS_PARAMETER_TYPES) |
440 | 440 |
else: |
441 | 441 |
# FIXME: assuming list type |
442 |
if not isinstance(value, list): |
|
442 |
if key in constants.IPOLICY_PARAMETERS: |
|
443 |
exp_type = float |
|
444 |
else: |
|
445 |
exp_type = list |
|
446 |
if not isinstance(value, exp_type): |
|
443 | 447 |
result.append("%s has invalid instance policy: for %s," |
444 |
" expecting list, got %s" %
|
|
445 |
(owner, key, type(value))) |
|
448 |
" expecting %s, got %s" %
|
|
449 |
(owner, key, exp_type.__name__, type(value)))
|
|
446 | 450 |
|
447 | 451 |
# check cluster parameters |
448 | 452 |
_helper("cluster", "beparams", cluster.SimpleFillBE({}), |
Also available in: Unified diff