[PATCHES] Some fixes in s4/scripting/upgradeprovision

Douglas Bagnall douglas.bagnall at catalyst.net.nz
Thu Oct 11 23:47:36 UTC 2018


On 11/10/18 21:24, Noel Power wrote:
> 
> -            if (long(str(old[0][att])) == 0):
> +            if (int(str(old[0][att])) == 0):
> 
> 
> very minor nitpick, we should do
> 
> -            if (long(str(old[0][att])) == 0):
> +            if (int(old[0][att]) == 0):
> 
> and remove the attempt to convert to str because it could cause a
> UnicodeDecode error rather than a desired ValueError if the attribute
> value is not a valid string/byte/bytearray representation of a number. I
> don't think anyone is filtering any particular exceptions here so
> probably not a real issue with this piece of code perse

A good point. There are a few other cases in that file so I have made
another patch as attached.

Douglas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba_updateprovision.patch
Type: text/x-patch
Size: 3437 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181012/d69f31b1/samba_updateprovision.bin>


More information about the samba-technical mailing list