diff --git a/users_ldap_push/models/res_users.py b/users_ldap_push/models/res_users.py index e163a453d..b819488f0 100644 --- a/users_ldap_push/models/res_users.py +++ b/users_ldap_push/models/res_users.py @@ -17,12 +17,17 @@ # along with this program. If not, see . # ############################################################################## -import ldap -import ldap.modlist -import logging from openerp import _, models, fields, api, exceptions +import logging + _logger = logging.getLogger(__name__) +try: + import ldap + import ldap.modlist +except ImportError: + _logger.debug('Can not `from ldap.filter import filter_format`.') + class ResUsers(models.Model): _inherit = 'res.users'