summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-05-20 08:07:49 +0000
committerTim Potter <tpot@samba.org>2002-05-20 08:07:49 +0000
commit03a83917874cf699b5936aa3fee7922199b4e05e (patch)
tree59d62ddad430b1a935ae51e5d46c3151897e327b /source3
parentbe92d4ac55caa3f44c5125cf4220bea4ca69e45e (diff)
downloadsamba-03a83917874cf699b5936aa3fee7922199b4e05e.tar.gz
samba-03a83917874cf699b5936aa3fee7922199b4e05e.tar.bz2
samba-03a83917874cf699b5936aa3fee7922199b4e05e.zip
py_to_DRIVER_INFO_3: remove level key on copy of dictionary before calling
to_struct(). (This used to be commit 274679d8ce33aaf664ffaaa6834d506f7b196fc6)
Diffstat (limited to 'source3')
-rw-r--r--source3/python/py_spoolss_drivers_conv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/python/py_spoolss_drivers_conv.c b/source3/python/py_spoolss_drivers_conv.c
index 07823bd3ff..dbf33905ae 100644
--- a/source3/python/py_spoolss_drivers_conv.c
+++ b/source3/python/py_spoolss_drivers_conv.c
@@ -113,9 +113,14 @@ BOOL py_from_DRIVER_INFO_3(PyObject **dict, DRIVER_INFO_3 *info)
BOOL py_to_DRIVER_INFO_3(DRIVER_INFO_3 *info, PyObject *dict)
{
- to_struct(info, dict, py_DRIVER_INFO_3);
+ PyObject *dict_copy = PyDict_Copy(dict);
+ BOOL result;
- return True;
+ PyDict_DelItemString(dict_copy, "level");
+ result = to_struct(info, dict_copy, py_DRIVER_INFO_3);
+
+ Py_DECREF(dict_copy);
+ return result;
}
BOOL py_from_DRIVER_INFO_6(PyObject **dict, DRIVER_INFO_6 *info)