[PATCH] [WIP] Catch ProvisioningError in samba-tool domain classicupgrade (was Re: [PATCHES] samba-tool: Don't print python stack traces in log level 0)

Andrew Bartlett abartlet at samba.org
Sat Nov 10 18:36:51 MST 2012

On Fri, 2012-11-09 at 14:05 +0100, Jelmer Vernooij wrote:
> Hi Metze,
> On Fri, 2012-11-09 at 09:20 +0100, Stefan (metze) Metzmacher wrote:
> > Hi Karolin,
> > 
> > here're the patches we've discussed and tested yesterday...
> -1, The behaviour here is intentional - the backtrace is only printed on
> unexpected exceptions, and printed so that it is easier for users to
> communicate with us about them. 
> If there is an expected exception, please catch it and raise
> CommandError("Some one line message that makes sense to the user.",
> original_exception).


I was trying to do this for samba-tool domain classicupgrade, as users
are having trouble seeing the actual error in the backtrace.  However,
as the second patch I attach here shows, it doesn't seem to work.  Any
idea what is wrong with the way ProvisioningError is being caught in

(to trigger, run this:)
make test TESTS=samba4.blackbox.upgrade


Andrew Bartlett

Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-samba-tool-Catch-ProvisioningError-on-samba-tool-dom.patch
Type: text/x-patch
Size: 1301 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20121111/87790d1a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-provisioningerror
Type: text/x-patch
Size: 697 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20121111/87790d1a/attachment-0001.bin>

More information about the samba-technical mailing list