[PATCH] samba-tool - make provision check for bind version

jelmer at samba.org jelmer at samba.org
Thu Jan 9 03:13:54 MST 2014

The simplest way to avoid this problem would be to just move the exception to a module that both provision.py and dnsprovision.py can import it from.

I would argue though that having as few exception classes as possible is not necessarily a good idea. If adding another one is a problem, perhaps we should look into why that is a problem.

Cheers, jelmer

Andrew Bartlett <abartlet at samba.org> wrote:
>On Wed, 2014-01-08 at 06:45 +0100, Jelmer Vernooij wrote:
>> On Tue, Jan 07, 2014 at 04:08:17PM +1300, Andrew Bartlett wrote:
>> >      """
>> > -
>> > +    from samba.provision import ProvisioningError
>> ^ Please avoid non-toplevel imports. If this is to avoid a circular
>import, perhaps
>> it makes sense to have a different kind of error object in this file?
>Yes, this is to avoid a circular import.  I would really appreciate
>advise on other good options here - we really don't want more error
>classes, certainly not one-off cases like a hypothetical
>DNSProvisioningError, because then it will be even harder to map these
>back to sensible errors in the samba-tool UI.
>Andrew Bartlett
>Andrew Bartlett                       http://samba.org/~abartlet/
>Authentication Developer, Samba Team  http://samba.org
>Samba Developer, Catalyst IT         

More information about the samba-technical mailing list