summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pykolab/setup/ldap_setup.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pykolab/setup/ldap_setup.py b/pykolab/setup/ldap_setup.py
index f381711..cc42a81 100644
--- a/pykolab/setup/ldap_setup.py
+++ b/pykolab/setup/ldap_setup.py
@@ -19,11 +19,15 @@
#
import getpass
-import ldap
import logging
import os
import sys
+try:
+ import ldap
+except ImportError, e:
+ print >> sys.stderr, _("Cannot load Python LDAP libraries.")
+
from pykolab.translate import _
from pykolab import constants
from pykolab import utils