Browse Source

[FIX] users_ldap_push: Protect imports

pull/353/head
Pedro M. Baeza 9 years ago
parent
commit
af34d51505
  1. 11
      users_ldap_push/models/res_users.py

11
users_ldap_push/models/res_users.py

@ -17,12 +17,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
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'

Loading…
Cancel
Save