diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-25 15:49:25 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-25 15:49:25 -0400 |
commit | 3b3ecb4fcba471d33dbd118c02798e6f3f4b9927 (patch) | |
tree | af85e3850935cd9e076d4e0da29f287fa9dcaefe /src/lib/Bcfg2/Server/Plugins/Ldap.py | |
parent | a74636278353b829f3589f6e671f1d56172b291c (diff) | |
download | bcfg2-3b3ecb4fcba471d33dbd118c02798e6f3f4b9927.tar.gz bcfg2-3b3ecb4fcba471d33dbd118c02798e6f3f4b9927.tar.bz2 bcfg2-3b3ecb4fcba471d33dbd118c02798e6f3f4b9927.zip |
various pylint fixes
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Ldap.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Ldap.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Ldap.py b/src/lib/Bcfg2/Server/Plugins/Ldap.py index 8e5ce2624..f724402d0 100644 --- a/src/lib/Bcfg2/Server/Plugins/Ldap.py +++ b/src/lib/Bcfg2/Server/Plugins/Ldap.py @@ -10,7 +10,7 @@ logger = logging.getLogger('Bcfg2.Plugins.Ldap') try: import ldap -except: +except ImportError: logger.error("Unable to load ldap module. Is python-ldap installed?") raise ImportError @@ -21,16 +21,18 @@ RETRY_DELAY = 5 RETRY_COUNT = 3 SCOPE_MAP = { - "base" : ldap.SCOPE_BASE, - "one" : ldap.SCOPE_ONELEVEL, - "sub" : ldap.SCOPE_SUBTREE, + "base": ldap.SCOPE_BASE, + "one": ldap.SCOPE_ONELEVEL, + "sub": ldap.SCOPE_SUBTREE, } LDAP_QUERIES = [] + def register_query(query): LDAP_QUERIES.append(query) + class ConfigFile(Bcfg2.Server.Plugin.FileBacked): """ Config file for the Ldap plugin @@ -58,6 +60,7 @@ class ConfigFile(Bcfg2.Server.Plugin.FileBacked): LDAP_QUERIES = [] imp.load_source("ldap_cfg", self.filename) + class Ldap(Bcfg2.Server.Plugin.Plugin, Bcfg2.Server.Plugin.Connector): """ The Ldap plugin allows adding data from an LDAP server to your metadata. |