From 8e917f27f2d54180829696d23073f671df5b9216 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 8 May 2002 04:22:17 +0000 Subject: Changed some error returns to return a werror tuple (status code and text message) instead of just the status code. (This used to be commit 39f58333fa84dc05cac8d13cabb1f203c5cf2c62) --- source3/python/py_spoolss_printers.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source3/python/py_spoolss_printers.c') 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; } -- cgit