[PATCH] Re: samba-tool fsmo transfer - uncaught exception

Rowland penny rpenny at samba.org
Mon May 27 06:59:32 UTC 2019


On 27/05/2019 02:28, Douglas Bagnall wrote:
> On 26/05/19 11:22 PM, Rowland penny wrote:
>
>> How do you test for something that works on some computers, but not on
>> others ?
> With Gitlab CI.
>
>> Which is correct, it working, or it not working ?
> Well, when I go
>
> PYTHONPATH=bin/python python3 -c 'import samba; samba.drs_utils.drsException'
>
> I get "module 'samba' has no attribute 'drs_utils'".
>
> Maybe Python 2 was different.
>
>> If you have a problem with the test, take it up with Andrew, I initially
>> created the script following his advice, he later 'improved' it, obviously
>> not enough ;-)
> Yes. It only tests 'samba-tool fsmo show', not 'seize' and 'transfer'.
That is what Andrew wanted at the time, feel free to extend the test.
>
>> Anyway, NACK to your patch, but only because you haven't remove the
>> 'import samba' line.
> OK, though I don't it would work with the line removed.
> For example, it would break
>
>          forest_dn = samba.dn_from_dns_name(samdb.forest_dns_name())
>
> and it *might* break other things too because, as discussed, Python
> imports can be a bit weird with unexpected side-effects.
>
> cheers,
> Douglas

So how do you propose to test for this ? When having just 'import samba' 
fails for 'samba.drs_utils' but works for 'samba.dn_from_dns_name' ? To 
me, this looks like a bug in python.

Rowland




More information about the samba-technical mailing list