summaryrefslogtreecommitdiff
path: root/source3/python
diff options
context:
space:
mode:
Diffstat (limited to 'source3/python')
-rw-r--r--source3/python/py_spoolss_printers.c2
-rw-r--r--source3/python/py_spoolss_printers_conv.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/source3/python/py_spoolss_printers.c b/source3/python/py_spoolss_printers.c
index 17c8af902a..d20b144502 100644
--- a/source3/python/py_spoolss_printers.c
+++ b/source3/python/py_spoolss_printers.c
@@ -170,8 +170,6 @@ PyObject *spoolss_getprinter(PyObject *self, PyObject *args, PyObject *kw)
break;
}
- PyDict_SetItemString(result, "level", PyInt_FromLong(level));
-
Py_INCREF(result);
return result;
}
diff --git a/source3/python/py_spoolss_printers_conv.c b/source3/python/py_spoolss_printers_conv.c
index 89980ef25a..b20382922c 100644
--- a/source3/python/py_spoolss_printers_conv.c
+++ b/source3/python/py_spoolss_printers_conv.c
@@ -181,6 +181,7 @@ BOOL py_to_DEVICEMODE(DEVICEMODE *devmode, PyObject *dict)
BOOL py_from_PRINTER_INFO_0(PyObject **dict, PRINTER_INFO_0 *info)
{
*dict = from_struct(info, py_PRINTER_INFO_0);
+ PyDict_SetItemString(*dict, "level", PyInt_FromLong(0));
return True;
}
@@ -196,6 +197,7 @@ BOOL py_to_PRINTER_INFO_0(PRINTER_INFO_0 *info, PyObject *dict)
BOOL py_from_PRINTER_INFO_1(PyObject **dict, PRINTER_INFO_1 *info)
{
*dict = from_struct(info, py_PRINTER_INFO_1);
+ PyDict_SetItemString(*dict, "level", PyInt_FromLong(1));
return True;
}
@@ -220,6 +222,8 @@ BOOL py_from_PRINTER_INFO_2(PyObject **dict, PRINTER_INFO_2 *info)
if (py_from_DEVICEMODE(&obj, info->devmode))
PyDict_SetItemString(*dict, "device_mode", obj);
+ PyDict_SetItemString(*dict, "level", PyInt_FromLong(2));
+
return True;
}
@@ -260,6 +264,8 @@ BOOL py_from_PRINTER_INFO_3(PyObject **dict, PRINTER_INFO_3 *info)
if (py_from_SECDESC(&obj, info->secdesc))
PyDict_SetItemString(*dict, "security_descriptor", obj);
+ PyDict_SetItemString(*dict, "level", PyInt_FromLong(3));
+
return True;
}