From 0a01f50f9802ecfae430d2218af3b96a3682218d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 16 Dec 2007 15:50:02 +0100 Subject: r26475: Add ldb.set_credentials function. (This used to be commit dbebb4ef477d2c8de7b8d1e5cde9b9dada47044f) --- source4/scripting/python/samba/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source4/scripting/python/samba') diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index 2c51440b0c..29d322e2fc 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -19,10 +19,9 @@ # import os -from misc import ldb_set_credentials def _in_source_tree(): - print os.path.exists("%s/../../../samba4-skip" % os.path.dirname(__file__)) + return os.path.exists("%s/../../../samba4-skip" % os.path.dirname(__file__)) # When running, in-tree, make sure bin/python is in the PYTHONPATH if _in_source_tree(): @@ -30,6 +29,10 @@ if _in_source_tree(): dir = os.path.dirname(__file__) sys.path.append("%s/../../../bin/python" % os.path.dirname(__file__)) +import misc +import ldb +ldb.ldb.set_credentials = misc.ldb_set_credentials + def Ldb(url, session_info=None, credentials=None, modules_dir=None): """Open a Samba Ldb file. -- cgit