git.samba.org
/
ira
/
wip.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ldb/python: Support comparing Dn's to strings.
[ira/wip.git]
/
source
/
lib
/
ldb
/
ldb.i
diff --git
a/source/lib/ldb/ldb.i
b/source/lib/ldb/ldb.i
index 2604393e8ff1b97bd10c1d3954b64e34d81456b2..560142eb6deb0822a566501d32a499cd4b642616 100644
(file)
--- a/
source/lib/ldb/ldb.i
+++ b/
source/lib/ldb/ldb.i
@@
-201,6
+201,14
@@
fail:
/* FIXME: implement __getslice__ */
#endif
+ %pythoncode {
+ def __eq__(self, other):
+ if isinstance(other, self.__class__):
+ return self.__cmp__(other) == 0
+ if isinstance(other, str):
+ return str(self) == other
+ return False
+ }
}
} ldb_dn;