Review for python patch for upgradeprovision

Matthieu Patou mat at samba.org
Tue Aug 17 11:11:29 MDT 2010


  Jelmer,

Should I take your silence for a validation ?
>>   * you can give a default value to dict.get(), which will be used if 
>> the
>> key was not found. Rather than:
>>
>>                   val = e.get("msDs-KeyVersionNumber")
>>                   if not val:
>>                       val = "0"
> I tried and got:
>   File "bin/python/samba/upgradehelpers.py", line 741, in 
> increment_calculated_keyversion_number
>     val = e.get("msDs-KeyVersionNumber", "0")
> TypeError: function takes exactly 1 argument (2 given)
> 0
>
> It seems that the the get method in the  ldb.Message object didn't 
> support the things that a dictionnary support.
>> You can also use:
>>
>>         val = e.get("msDs-KeyVersionNumber", "0")
>>
>>
> So other than the val = e.get("msDs-KeyVersionNumber", "0") I made the 
> different change that you proposed (they are all in my branch now).
>
> I added a few patches for small pbs that I found also during testing.
>
Cheers Matthieu.


-- 
Matthieu Patou
Samba Team        http://samba.org



More information about the samba-technical mailing list