Am 21. Februar 2012 11:18 schrieb Iustin Pop <[email protected]>:
>> diff --git a/lib/objects.py b/lib/objects.py
>> index e8c558c..8f3df18 100644
>> --- a/lib/objects.py
>> +++ b/lib/objects.py
>> @@ -155,13 +155,12 @@ def UpgradeDiskParams(diskparams):
>>    if diskparams is None:
>>      result = constants.DISK_DT_DEFAULTS.copy()
>>    else:
>> -    result = {}
>>      # Update the disk parameter values for each disk template.
>>      # The code iterates over constants.DISK_TEMPLATES because new templates
>>      # might have been added.
>> -    for template in constants.DISK_TEMPLATES:
>> -      result[template] = FillDict(constants.DISK_DT_DEFAULTS[template],
>> -                                  diskparams.get(template, {}))
>> +    result = dict((dt, FillDict(constants.DISK_DT_DEFAULTS[template],
>> +                                diskparams.get(template, {})))
>> +                  for dt in constants.DISK_TEMPLATES)
>>
>>    return result
>
> Of course s/template/dt/ in that code…

LGTM

Reply via email to