From 58364b5901fe9df67fbd93d9fced1b4af72195fa Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 29 Sep 2017 15:44:17 +0200 Subject: [PATCH] users_ldap_populate: try/except on import ldap --- users_ldap_populate/model/users_ldap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users_ldap_populate/model/users_ldap.py b/users_ldap_populate/model/users_ldap.py index c20ae0503..1c81667de 100644 --- a/users_ldap_populate/model/users_ldap.py +++ b/users_ldap_populate/model/users_ldap.py @@ -21,16 +21,16 @@ import re from openerp.osv import orm, fields # pylint: disable=W0402 -import ldap from openerp import SUPERUSER_ID import logging _logger = logging.getLogger(__name__) try: + import ldap from ldap.filter import filter_format except ImportError: - _logger.debug('Can not `from ldap.filter import filter_format`.') + _logger.debug('Cannot import ldap') class CompanyLDAP(orm.Model):