summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/python/py_spoolss_printers.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/python/py_spoolss_printers.c b/source3/python/py_spoolss_printers.c
index b006e54d81..17c8af902a 100644
--- a/source3/python/py_spoolss_printers.c
+++ b/source3/python/py_spoolss_printers.c
@@ -145,8 +145,7 @@ PyObject *spoolss_getprinter(PyObject *self, PyObject *args, PyObject *kw)
/* Return value */
if (!W_ERROR_IS_OK(werror)) {
- PyErr_SetObject(spoolss_werror,
- PyInt_FromLong(W_ERROR_V(werror)));
+ PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
return NULL;
}
@@ -313,8 +312,7 @@ PyObject *spoolss_enumprinters(PyObject *self, PyObject *args, PyObject *kw)
/* Return value */
if (!W_ERROR_IS_OK(werror)) {
- PyErr_SetObject(spoolss_werror,
- PyInt_FromLong(W_ERROR_V(werror)));
+ PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
return NULL;
}