import libxml2 only if LibertyDirectory is used

This commit is contained in:
Thomas NOËL 2012-08-29 11:47:58 +02:00
parent cbcc055e86
commit 46f142df1e
1 changed files with 1 additions and 3 deletions

View File

@ -14,8 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
import libxml2
from quixote import get_publisher
from qommon import get_cfg
@ -25,7 +23,7 @@ import qommon.liberty
class LibertyDirectory(qommon.liberty.LibertyDirectory):
def lookup_user(self, session, login):
import lasso
import libxml2, lasso
ni = login.nameIdentifier.content
session.name_identifier = ni
nis = list(get_publisher().user_class.select(lambda x: ni in x.name_identifiers))