The Samba-Bugzilla – Attachment 6566 Details for
Bug 8063
cannot upgrade from a11 to a14
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for last problem
0001-py-ldb-allow-dictionnary-like-usage-ie.-e.get-myattr.patch (text/plain), 1.08 KB, created by
Matthieu Patou
on 2011-06-11 13:00:11 UTC
(
hide
)
Description:
patch for last problem
Filename:
MIME Type:
Creator:
Matthieu Patou
Created:
2011-06-11 13:00:11 UTC
Size:
1.08 KB
patch
obsolete
>From ef45e845f08a8f4c637fa636ebb92a0ecfe9b99e Mon Sep 17 00:00:00 2001 >From: Matthieu Patou <mat@matws.net> >Date: Sat, 11 Jun 2011 16:57:02 +0400 >Subject: [PATCH] py-ldb: allow dictionnary like usage (ie. e.get("myattribute", defVal) > >--- > source4/lib/ldb/pyldb.c | 11 ++++++++--- > 1 files changed, 8 insertions(+), 3 deletions(-) > >diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c >index 88ae70a..1a73608 100644 >--- a/source4/lib/ldb/pyldb.c >+++ b/source4/lib/ldb/pyldb.c >@@ -2444,15 +2444,20 @@ static PyObject *py_ldb_msg_getitem(PyLdbMessageObject *self, PyObject *py_name) > > static PyObject *py_ldb_msg_get(PyLdbMessageObject *self, PyObject *args) > { >- PyObject *name, *ret; >- if (!PyArg_ParseTuple(args, "O", &name)) >+ PyObject *name, *ret, *retobj; >+ retobj = NULL; >+ if (!PyArg_ParseTuple(args, "O|O", &name, &retobj)) > return NULL; > > ret = py_ldb_msg_getitem_helper(self, name); > if (ret == NULL) { > if (PyErr_Occurred()) > return NULL; >- Py_RETURN_NONE; >+ if (retobj != NULL) { >+ return retobj; >+ } else { >+ Py_RETURN_NONE; >+ } > } > return ret; > } >-- >1.7.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8063
:
6436
|
6501
|
6514
|
6517
|
6518
|
6521
|
6522
|
6523
|
6564
| 6566