summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-22 16:33:06 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-22 16:33:06 +0100
commit8475d18641e407ad13b0529e788bd472018a5cc2 (patch)
treea702c025b4e02ed2e3db7b8330d9aada32515538
parenta071290606a99f9975800ae97e60361c07a741c6 (diff)
parent84501f6b59e7903581deb87c7612f0a879cfb576 (diff)
downloadsamba-8475d18641e407ad13b0529e788bd472018a5cc2.tar.gz
Merge branch 'master' of ssh://git.samba.org/data/git/samba
-rw-r--r--source4/param/pyparam.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index 04bef07231..0cf651dd7c 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -317,6 +317,8 @@ struct loadparm_context *lp_from_py_object(PyObject *py_obj)
lp_ctx = loadparm_init(NULL);
if (!lp_load(lp_ctx, PyString_AsString(py_obj))) {
talloc_free(lp_ctx);
+ PyErr_Format(PyExc_RuntimeError,
+ "Unable to load %s", PyString_AsString(py_obj));
return NULL;
}
return lp_ctx;
@@ -324,10 +326,8 @@ struct loadparm_context *lp_from_py_object(PyObject *py_obj)
if (py_obj == Py_None) {
lp_ctx = loadparm_init(NULL);
- if (!lp_load_default(lp_ctx)) {
- talloc_free(lp_ctx);
- return NULL;
- }
+ /* We're not checking that loading the file succeeded *on purpose */
+ lp_load_default(lp_ctx);
return lp_ctx;
}