summaryrefslogtreecommitdiffstats
path: root/pykolab/setup/ldap_setup.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2010-10-08 13:32:35 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2010-10-08 13:32:35 +0200
commit9d6bb677ffe6a362dc939c9fd152f9c27a4a96d6 (patch)
treec02d89c83188a85757d6c394d2ac59df443c6fa8 /pykolab/setup/ldap_setup.py
parentd60eebbdfe20859dd29fa3d6f0ad0daea77bc0f3 (diff)
downloadpykolab-9d6bb677ffe6a362dc939c9fd152f9c27a4a96d6.tar.gz
Attempt to load the lib, but fail verbosely if it doesn't succeed
Diffstat (limited to 'pykolab/setup/ldap_setup.py')
-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