git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
354a2e0
)
python/param: Cope with lp configfile being NULL.
author
Jelmer Vernooij
<jelmer@samba.org>
Thu, 15 Jan 2009 20:16:31 +0000
(21:16 +0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Thu, 15 Jan 2009 20:16:31 +0000
(21:16 +0100)
source4/param/pyparam.c
patch
|
blob
|
history
diff --git
a/source4/param/pyparam.c
b/source4/param/pyparam.c
index 2d5a584fb2709656573de95464e83b022ecd959d..0061eadc54e0c98f85aa1122de87accad499fe6a 100644
(file)
--- 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[] = {