[PATCH] Improve NTSTATUS exception handling in python

Andrew Bartlett abartlet at samba.org
Tue Nov 1 06:28:17 UTC 2016


G'Day,

The attached patches improve our exception handling in our python
bindings, so as to make it possible to raise NTSTATUS and WERROR
errors, and catch them, rather than going via RuntimeException.

These exceptions are made children of RuntimeException to allow the
previous code to operate correctly.

This, and the changes included not to translate WERROR -> NTSTATUS in
the replication code should make bug 12398 much easier to fix. 

Any thoughts most appreciated.  Otherwise I hope to push these with the
RID Set changes my team has been working on (see followup).

Thanks,

Andrew Bartlett
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dsdb-Rework-DSDB-code-to-use-WERROR.patch
Type: text/x-patch
Size: 18232 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161101/722fbea6/0001-dsdb-Rework-DSDB-code-to-use-WERROR.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-dsdb-Catch-errors-in-extended-operations-like-alloca.patch
Type: text/x-patch
Size: 3690 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161101/722fbea6/0002-dsdb-Catch-errors-in-extended-operations-like-alloca.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-python-create-NTSTATUSError-HRESULTError-and-WERRORE.patch
Type: text/x-patch
Size: 3529 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161101/722fbea6/0003-python-create-NTSTATUSError-HRESULTError-and-WERRORE.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-pyerrors-Add-PyErr_Set-WERROR-HRESULT-NTSTATUS-_and_.patch
Type: text/x-patch
Size: 1515 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161101/722fbea6/0004-pyerrors-Add-PyErr_Set-WERROR-HRESULT-NTSTATUS-_and_.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-python-Add-DsExtendedError-Exception.patch
Type: text/x-patch
Size: 1671 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161101/722fbea6/0005-python-Add-DsExtendedError-Exception.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-python-libnet-Use-new-NTSTATUSError-WERRORError-and-.patch
Type: text/x-patch
Size: 7929 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161101/722fbea6/0006-python-libnet-Use-new-NTSTATUSError-WERRORError-and-.bin>


More information about the samba-technical mailing list