summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/auth/ldapdriver.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py
index 95e31ae3b..183f7a985 100644
--- a/nova/auth/ldapdriver.py
+++ b/nova/auth/ldapdriver.py
@@ -676,6 +676,7 @@ class LdapDriver(object):
class FakeLdapDriver(LdapDriver):
"""Fake Ldap Auth driver"""
- def __init__(self): # pylint: disable=W0231
- __import__('nova.auth.fakeldap')
- self.ldap = sys.modules['nova.auth.fakeldap']
+ def __init__(self):
+ import nova.auth.fakeldap
+ sys.modules['ldap'] = nova.auth.fakeldap
+ super(FakeLdapDriver, self).__init__()