From 1e40e973bd67191679ec1965c5200adb5e48e524 Mon Sep 17 00:00:00 2001 From: pauget Date: Tue, 7 Sep 2004 12:18:07 +0200 Subject: [PATCH] Optimisation darcs-hash:20040907101807-41617-5230acb7e058a3f22c4c4fa94ebe75108e0c59d0.gz --- gestion/ldap_crans.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 5c1603b0..2a910e04 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -12,7 +12,8 @@ Licence : GPLv2 from socket import gethostname date_format='%d/%m/%Y %H:%M' -if gethostname().split(".")[0] == "zamok": +hostname = gethostname().split(".")[0] +if hostname == "zamok": uri = 'ldapi://%2fvar%2frun%2fldapi/' else: uri = 'ldaps://zamok.crans.org:636/' @@ -21,7 +22,7 @@ smtpserv = "localhost" # TODO : # Interdire la modif des comptes nounou -import smtplib, sre, os, random, string, time, commands, sys +import smtplib, sre, os, random, string, time, sys import ldap, ldap.modlist import config, annuaires, iptools, chgpass, user_tests @@ -46,7 +47,6 @@ droits_possibles = [ u'Nounou', u'Apprenti', u'Mod ### Variables internes diverses isadm = user_tests.isadm() isdeconnecteur = user_tests.isdeconnecteur() -hostname = commands.getoutput('hostname') ann_scol = config.ann_scol ##################################################################################