[SCM] Samba Shared Repository - branch master updated - 84501f6b59e7903581deb87c7612f0a879cfb576

Jelmer Vernooij jelmer at samba.org
Mon Dec 22 05:37:17 GMT 2008


The branch, master has been updated
       via  84501f6b59e7903581deb87c7612f0a879cfb576 (commit)
      from  1807b0870bd1b50229f29b9f78f660a454682006 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 84501f6b59e7903581deb87c7612f0a879cfb576
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Dec 22 06:34:18 2008 +0100

    Raise proper exceptions when lp file can't be found, be a
    bit less strict when no file was specified.

-----------------------------------------------------------------------

Summary of changes:
 source4/param/pyparam.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index 04bef07..0cf651d 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;
     }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list