python: create NTSTATUSError, HRESULTError and WERRORError
authorAndrew Bartlett <abartlet@samba.org>
Tue, 1 Nov 2016 02:23:58 +0000 (15:23 +1300)
committerGarming Sam <garming@samba.org>
Fri, 4 Nov 2016 03:41:19 +0000 (04:41 +0100)
commitc8505c53da3e21f31454f121efd5961d95349a38
tree686acac488a701d7e839390244f85f69a0dec65e
parentf72da5ba51ae8bf9f3f54bed36b4572cd1b57adb
python: create NTSTATUSError, HRESULTError and WERRORError

The advantage of these over the previous use of just RuntimeError is that we can
catch just the errors we want, without having to catch all possible RuntimeError
cases and assume they decode to a tuple

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398
python/pyglue.c
python/samba/__init__.py
source4/libcli/util/pyerrors.h