diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-11-03 19:12:17 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-11-03 19:13:36 +0000 |
commit | 654fdce6a2b67c739675fb29c5072ca676ac00a7 (patch) | |
tree | 8aea19a278b0605b2d2a373b65cd61c37df008ac /source4/scripting/python | |
parent | 4bf6a3e72c9c954aa1f7ff566e30dd21d75fcfcc (diff) | |
download | samba-654fdce6a2b67c739675fb29c5072ca676ac00a7.tar.gz samba-654fdce6a2b67c739675fb29c5072ca676ac00a7.tar.bz2 samba-654fdce6a2b67c739675fb29c5072ca676ac00a7.zip |
samba: Make in_source_tree() public.
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index 5299e07466..5a9df50627 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -27,13 +27,13 @@ __docformat__ = "restructuredText" import os import sys -def _in_source_tree(): +def in_source_tree(): """Check whether the script is being run from the source dir. """ return os.path.exists("%s/../../../selftest/skip" % os.path.dirname(__file__)) # When running, in-tree, make sure bin/python is in the PYTHONPATH -if _in_source_tree(): +if in_source_tree(): srcdir = "%s/../../.." % os.path.dirname(__file__) sys.path.append("%s/bin/python" % srcdir) default_ldb_modules_dir = "%s/bin/modules/ldb" % srcdir @@ -312,7 +312,7 @@ def ensure_external_module(modulename, location): try: __import__(modulename) except ImportError: - if _in_source_tree(): + if in_source_tree(): sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../../../lib", location)) |