Changement du nom du lock
darcs-hash:20041212121826-d1718-3e727525af1ceb1e07ba9676741504941a374882.gz
This commit is contained in:
parent
87204b5bf9
commit
8d9d568992
1 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue