diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-15 21:16:31 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-15 21:16:31 +0100 |
commit | 2d85e23e06182c42a054477a62917a2176aaab16 (patch) | |
tree | fb8dc5f81c63084597a804aee4fe3161a382689a | |
parent | 354a2e03abda1e4c31256472ae721eadbf695591 (diff) | |
download | samba-2d85e23e06182c42a054477a62917a2176aaab16.tar.gz samba-2d85e23e06182c42a054477a62917a2176aaab16.tar.xz samba-2d85e23e06182c42a054477a62917a2176aaab16.zip |
python/param: Cope with lp configfile being NULL.
-rw-r--r-- | source4/param/pyparam.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index 2d5a584fb27..0061eadc54e 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -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[] = { |