[PATCH 08/13] Remove now unused samba.ensure_external_module() - replaced by samba.ensure_third_party_module().
Jelmer Vernooij
jelmer at samba.org
Sat Nov 15 12:17:03 MST 2014
Change-Id: Ic521629118cb7f2b02f182353a73ce87ac1a27d2
Signed-off-by: Jelmer Vernooij <jelmer at samba.org>
---
python/samba/__init__.py | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/python/samba/__init__.py b/python/samba/__init__.py
index d49bcd8..47174ab 100644
--- a/python/samba/__init__.py
+++ b/python/samba/__init__.py
@@ -367,32 +367,6 @@ def ensure_third_party_module(modulename, location, check=lambda mod: True):
return mod
-def ensure_external_module(modulename, location, check=lambda mod: True):
- """Add a location to sys.path if an external dependency can't be found.
-
- :param modulename: Module name to import
- :param location: Location to add to sys.path (can be relative to
- ${srcdir}/lib)
- :param check: Optional callback to check the module
- :return: The module object
- """
- # This is deprecated - please use ensure_third_party_module for
- # new modules instead, and put them in third_party/.
- try:
- mod = __import__(modulename)
- except ImportError:
- mod = import_bundled_package(modulename, location,
- source_tree_container="lib", namespace="samba.external")
- else:
- if not check(mod):
- mod = import_bundled_package(modulename, location,
- source_tree_container="lib", namespace="samba.external")
- if not check(mod):
- raise ImportError("Unable to find checked system or bundled %s" %
- modulename)
- return mod
-
-
def dn_from_dns_name(dnsdomain):
"""return a DN from a DNS name domain/forest root"""
return "DC=" + ",DC=".join(dnsdomain.split("."))
--
2.1.3
More information about the samba-technical
mailing list