Browse Source

Merge pull request #1004 from akretion/0-try-import-ldap

[10.0] users_ldap_populate: try/except on import ldap
pull/1015/head
Dave Lasley 7 years ago
committed by GitHub
parent
commit
5359952400
  1. 2
      users_ldap_populate/__manifest__.py
  2. 4
      users_ldap_populate/models/users_ldap.py

2
users_ldap_populate/__manifest__.py

@ -4,7 +4,7 @@
{
"name": "LDAP Populate",
"version": "10.0.1.0.0",
"version": "10.0.1.0.1",
"author": (
"Therp BV",
"Odoo Community Association (OCA)",

4
users_ldap_populate/models/users_ldap.py

@ -7,14 +7,14 @@ import re
from odoo import models, fields, api, _, SUPERUSER_ID
from odoo.exceptions import UserError
import logging
import ldap
_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(models.Model):

Loading…
Cancel
Save