diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-24 11:02:45 -0600 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-26 11:57:03 -0600 |
commit | a822a14d1ec7e2635c3d004cc7488e4fd27b8d16 (patch) | |
tree | 50818c805dfbf204941c3d7b9bc8ec5482ee472e /source4/lib/ldb/ldb.py | |
parent | 9faf93c7b0e00edcdc3f535ea69fc2c1bb6eeeb3 (diff) | |
download | samba-a822a14d1ec7e2635c3d004cc7488e4fd27b8d16.tar.gz samba-a822a14d1ec7e2635c3d004cc7488e4fd27b8d16.tar.bz2 samba-a822a14d1ec7e2635c3d004cc7488e4fd27b8d16.zip |
r26584: Fix exception handling in ldb constructor.
(This used to be commit 5383cf8e69233b3cb7c1876f52644537e459dea6)
Diffstat (limited to 'source4/lib/ldb/ldb.py')
-rw-r--r-- | source4/lib/ldb/ldb.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb.py b/source4/lib/ldb/ldb.py index 160fa88dff..ebf8f6025a 100644 --- a/source4/lib/ldb/ldb.py +++ b/source4/lib/ldb/ldb.py @@ -176,6 +176,11 @@ class Ldb(object): def __init__(self, *args, **kwargs): _ldb.Ldb_swiginit(self,_ldb.new_Ldb(*args, **kwargs)) __swig_destroy__ = _ldb.delete_Ldb + def __init__(self, url=None, flags=0, options=None): + _ldb.Ldb_swiginit(self,_ldb.new_Ldb()) + if url is not None: + self.connect(url, flags, options) + Ldb.connect = new_instancemethod(_ldb.Ldb_connect,None,Ldb) Ldb.search = new_instancemethod(_ldb.Ldb_search,None,Ldb) Ldb.delete = new_instancemethod(_ldb.Ldb_delete,None,Ldb) |