From 8cd8a93fad1d5ce736980c242cef2057b6af23fc Mon Sep 17 00:00:00 2001 From: chove Date: Fri, 22 Oct 2004 03:09:51 +0200 Subject: [PATCH] autostatus correction de bug darcs-hash:20041022010951-4ec08-42dffe8c85330e2713334ab106ee77fcdb82aea9.gz --- gestion/ldap_crans.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 2927f86e..3e970e00 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -1949,7 +1949,7 @@ class machine(base_classes_crans) : Enregistre la machine courante dans la base LDAP Retourne une chaîne indiquant les opération effectuées. """ - if self.proprietaire() == crans and not isadm : + if self.proprietaire().Nom() == "Crans" and not isadm : raise EnvironmentError(u'Il faut être administrateur pour effectuer cette opération.') ret ='' @@ -1976,7 +1976,11 @@ class machine(base_classes_crans) : if bl and ( 'ipHostNumber' in self.modifs or 'host' in self.modifs ): for s in bl : self.services_to_restart(s,[ self.ip() ] ) - + + # Regénération de l'autostatus ? + if self.proprietaire().Nom() == "Crans" : + self.services_to_restart('autostatus') + # Remise à zéro self.modifs=[]