[Patch] fix for bug 11613, samba-tool fsmo throws an error

Rowland Penny repenny241155 at gmail.com
Sat Dec 5 20:42:18 UTC 2015

On 05/12/15 20:39, Uri Simchoni wrote:
> On 12/05/2015 10:16 PM, Andrew Bartlett wrote:
>> On Sat, 2015-12-05 at 21:51 +0200, Uri Simchoni wrote:
>>> Pushed to autobuild.
>>> However, I do see other uses of "assert(len(something) == 1)" in
>>> python/samba/netcmd and I have to wonder whether they have to be
>>> fixed too.
>> If they would indicate a really unlikely situation, then that should be
>> fine - much as we don't check every search result before de
>> -referencing.
>> Until this bug was raised, I would have assumed all FSMO roles were
>> filled all the time, but if a server has been deleted it certainly
>> could appear to be un-filled (links to deleted objects get hidden).
>> However there is an issue with the original patch, and I'm sorry for
>> not getting in earlier with a comment.  The idea of raising an
>> exception is fine, but if you look at the other exceptions in that
>> file, they raise a CommandError, not the generic Exception, and we
>> should do the same here.
>> This ensures we can catch it correctly and print it nicely, while
>> leaving real 'crashes' as backtraces.
>> Presumably it will be in master by the time you get this, so please
>> just apply a new patch using CommandError instead of Exception.
>> Thanks!
>> Andrew Bartlett
> Stopped autobuild in time and pushed a revised version.
> Thanks!
> Uri

In which case, I won't bother with a new patch, it got fixed whilst I 
was typing my last email :-D


More information about the samba-technical mailing list