summaryrefslogtreecommitdiff
path: root/source4/libcli/util
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/util')
-rw-r--r--source4/libcli/util/pyerrors.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/util/pyerrors.h b/source4/libcli/util/pyerrors.h
index e3e7bc4aac..0241e961e5 100644
--- a/source4/libcli/util/pyerrors.h
+++ b/source4/libcli/util/pyerrors.h
@@ -38,6 +38,12 @@
return NULL; \
}
+#define PyErr_NTSTATUS_NOT_OK_RAISE(status) \
+ if (!NT_STATUS_IS_OK(status)) { \
+ PyErr_SetNTSTATUS(status); \
+ return NULL; \
+ }
+
#define PyErr_WERROR_NOT_OK_RAISE(status) \
if (!W_ERROR_IS_OK(status)) { \
PyErr_SetWERROR(status); \