[sagenb] 27/179: added comments to explain why conf.html_table tries to import ldap
felix salfelder
felix-guest at moszumanska.debian.org
Tue May 6 12:05:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
felix-guest pushed a commit to branch master
in repository sagenb.
commit df215ce8c7507fe8003a641bbf0c6effa5f583ba
Author: Robin Martinjak <rob at rmartinjak.de>
Date: Sun Sep 16 12:37:47 2012 +0200
added comments to explain why conf.html_table tries to import ldap
---
sagenb/notebook/conf.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sagenb/notebook/conf.py b/sagenb/notebook/conf.py
index a6510db..e435d6d 100644
--- a/sagenb/notebook/conf.py
+++ b/sagenb/notebook/conf.py
@@ -127,6 +127,8 @@ class Configuration(object):
def html_table(self, updated = {}):
from server_conf import G_LDAP
+
+ # check if LDAP can be used
try:
from ldap import __version__ as ldap_version
except ImportError:
@@ -143,6 +145,7 @@ class Configuration(object):
for key in K:
try:
gp = DS[key][GROUP]
+ # don't display LDAP settings if the check above failed
if gp == G_LDAP and ldap_version is None:
continue
DS[key][DESC]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git
More information about the debian-science-commits
mailing list