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:
parent
354a2e03ab
commit
2d85e23e06
@ -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[] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user