1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

python/param: Cope with lp configfile being NULL.

This commit is contained in:
Jelmer Vernooij 2009-01-15 21:16:31 +01:00
parent 354a2e03ab
commit 2d85e23e06

View File

@ -263,7 +263,11 @@ static PyObject *py_lp_ctx_default_service(py_talloc_Object *self, void *closure
static PyObject *py_lp_ctx_config_file(py_talloc_Object *self, void *closure)
{
return PyString_FromString(lp_configfile(self->ptr));
const char *configfile = lp_configfile(self->ptr);
if (configfile == NULL)
Py_RETURN_NONE;
else
return PyString_FromString(configfile);
}
static PyGetSetDef py_lp_ctx_getset[] = {