From 8d9d568992528f102b4d5a5b6da17d9ef05e4d9d Mon Sep 17 00:00:00 2001 From: bernat Date: Sun, 12 Dec 2004 13:18:26 +0100 Subject: [PATCH] Changement du nom du lock darcs-hash:20041212121826-d1718-3e727525af1ceb1e07ba9676741504941a374882.gz --- gestion/wifi-update.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gestion/wifi-update.py b/gestion/wifi-update.py index 30114827..344e47ca 100755 --- a/gestion/wifi-update.py +++ b/gestion/wifi-update.py @@ -125,6 +125,8 @@ class UpdateProtocol(basic.LineReceiver): self.sendLine(ligne) else: self.sendLine("..") + else: + self.sendLine("") self.sendLine(".") class UpdateFactory(protocol.ServerFactory): @@ -208,10 +210,10 @@ class UpdateFactory(protocol.ServerFactory): # ETAPE 2 # On essaie d'obtenir le lock def delLockAndRaise(f): - remove_lock('gen_confs.wifi.conf_wifi') + remove_lock('gen_confs.wifi') return f - d = wait_lock('gen_confs.wifi.conf_wifi', 'locked by wifi-update') + d = wait_lock('gen_confs.wifi', 'locked by wifi-update') d.addCallback(lambda _: getSAD_script(self, getre, delre, host)) d.addErrback(delLockAndRaise) return d @@ -234,7 +236,7 @@ class UpdateFactory(protocol.ServerFactory): # Il ne devrait n'y en avoir qu'un, mais... for f in os.listdir('retry'): result = result + file('retry/%s' % f).read() - remove_lock('gen_confs.wifi.conf_wifi') + remove_lock('gen_confs.wifi') return result else: # Il n'y a rien dans le répertoire retry @@ -259,7 +261,7 @@ class UpdateFactory(protocol.ServerFactory): for f in delre: os.remove(f) - remove_lock('gen_confs.wifi.conf_wifi') + remove_lock('gen_confs.wifi') return result