summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-23 23:33:36 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-23 23:38:57 +0100
commitdecdf5954d5e1ae84318d6767317965f544a897f (patch)
treeb2d0d55116726fae8a086511100c341b769e199c /source4/lib/ldb
parent00cb710fbc872cffa2d4d5c54c5ea65ba993da0c (diff)
downloadsamba-decdf5954d5e1ae84318d6767317965f544a897f.tar.gz
samba-decdf5954d5e1ae84318d6767317965f544a897f.tar.bz2
samba-decdf5954d5e1ae84318d6767317965f544a897f.zip
python: Add convenience function for getting command line loadparm context
and default to using system smb.conf. (This used to be commit b3afde0f00ab5093b577b139a062c233d4db2524)
Diffstat (limited to 'source4/lib/ldb')
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index 01b66a3890..d35f7767df 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -19,7 +19,8 @@ from samba import Ldb
import param
parser = optparse.OptionParser("ldap [options] <host>")
-parser.add_option_group(options.SambaOptions(parser))
+sambaopts = options.SambaOptions(parser)
+parser.add_option_group(sambaopts)
parser.add_option_group(options.VersionOptions(parser))
# use command line creds if available
credopts = options.CredentialsOptions(parser)
@@ -33,9 +34,7 @@ if len(args) < 1:
host = args[0]
-lp = param.LoadParm()
-if opts.configfile:
- lp.load(opts.configfile)
+lp = sambaopts.get_loadparm()
def delete_force(ldb, dn):
try: