bit less strict when no file was specified.
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;
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;
}