Catch ldap ImportError

Since the `ldap` module isn't a requirement, we need to guard against it not
being present.

One reason this is needed is that we generate sample configs by walking the
module import tree. If a module isn't importable--because a depenency isn't
met, for example--the module's configs are omitted from the sample config,
requiring the developer to manually add them back.

Fixes bug 1208560

Change-Id: Ie23b7fad118ecadabf7e36703934fa933f4e8c50
This commit is contained in:
Rick Harris
2013-08-05 18:23:10 +00:00
parent f05e8db146
commit 03ab83cdb7

View File

@@ -7,9 +7,6 @@ mox==0.5.3
MySQL-python
psycopg2
pylint==0.25.2
# Imported by ldapdns so required to generate
# the sample configuration file
python-ldap==2.3.13
python-subunit
setuptools_git>=0.4
sphinx>=1.1.2