summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-05-16 05:17:43 +0000
committerTim Potter <tpot@samba.org>2002-05-16 05:17:43 +0000
commit0227141bd1e9543d8d8f2dddfc9f729e7975d6a1 (patch)
tree458ca6162985a61b9fe3d5c59602da56fd2c5bd5
parentce8990949343899f07ac98205cd8d4fa622c542a (diff)
downloadsamba-0227141bd1e9543d8d8f2dddfc9f729e7975d6a1.tar.gz
samba-0227141bd1e9543d8d8f2dddfc9f729e7975d6a1.tar.bz2
samba-0227141bd1e9543d8d8f2dddfc9f729e7975d6a1.zip
Set exception object when enumjobs returns non-zero NT status.
(This used to be commit b1818eb37572f4d30efef998d926ac111e78cb48)
-rw-r--r--source3/python/py_spoolss_jobs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/python/py_spoolss_jobs.c b/source3/python/py_spoolss_jobs.c
index 29475f9e3b..856e6252ea 100644
--- a/source3/python/py_spoolss_jobs.c
+++ b/source3/python/py_spoolss_jobs.c
@@ -52,8 +52,10 @@ PyObject *spoolss_hnd_enumjobs(PyObject *self, PyObject *args, PyObject *kw)
result = Py_None;
- if (!W_ERROR_IS_OK(werror))
+ if (!W_ERROR_IS_OK(werror)) {
+ PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
goto done;
+ }
result = PyList_New(num_jobs);