pyparam: Allow specifying None as section name to LoadparmContext.get()
authorJelmer Vernooij <jelmer@samba.org>
Sun, 20 Jun 2010 11:51:14 +0000 (13:51 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 20 Jun 2010 11:51:14 +0000 (13:51 +0200)
to mean default section.

source4/param/pyparam.c

index af577938d7324efd62154ae0ca0466a69821014a..d09cfb84dd4fb37325aedca5a39b3a49a35acae2 100644 (file)
@@ -175,7 +175,7 @@ static PyObject *py_lp_ctx_get(py_talloc_Object *self, PyObject *args)
        char *param_name;
        char *section_name = NULL;
        PyObject *ret;
-       if (!PyArg_ParseTuple(args, "s|s", &param_name, &section_name))
+       if (!PyArg_ParseTuple(args, "s|z", &param_name, &section_name))
                return NULL;
 
        ret = py_lp_ctx_get_helper(PyLoadparmContext_AsLoadparmContext(self), section_name, param_name);