pyldb: Let conversion to LDIF up to the user of the API rather than doing
authorJelmer Vernooij <jelmer@samba.org>
Sat, 21 Mar 2009 01:19:25 +0000 (02:19 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 21 Mar 2009 01:19:25 +0000 (02:19 +0100)
it implicitly.

source4/lib/ldb/pyldb.c

index 3e3aa97240c945fcce0368a42cb984acd9559247..bceda05e4fd4f7aa8077c551ba83b40f7e8df956 100644 (file)
@@ -65,18 +65,7 @@ static PyObject *PyObject_FromLdbValue(struct ldb_context *ldb_ctx,
        PyObject *ret;
        
        new_val = *val;
-       
-       if (ldb_ctx != NULL) {          
-               a = ldb_schema_attribute_by_name(ldb_ctx, el->name);
-       
-               if (a != NULL) {
-                       if (a->syntax->ldif_write_fn(ldb_ctx, mem_ctx, val, &new_val) != 0) {
-                               talloc_free(mem_ctx);
-                               return NULL;
-                       }
-               }
-       } 
-       
+
        ret = PyString_FromStringAndSize((const char *)new_val.data, new_val.length);
        
        talloc_free(mem_ctx);