From 5ac048dbd9a37a44833cf9c83318bf79cb3f075d Mon Sep 17 00:00:00 2001 From: salles Date: Mon, 10 Sep 2007 07:31:48 +0200 Subject: [PATCH] =?UTF-8?q?On=20=C3=A9vite=20de=20laisser=20trainer=20un?= =?UTF-8?q?=20fichier=20vide.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20070910053148-72cb0-0bf74316bb0a16039286b4d8f690f8682e41c428.gz --- munin/batiments | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/munin/batiments b/munin/batiments index 6808494e..00e0f92a 100755 --- a/munin/batiments +++ b/munin/batiments @@ -38,7 +38,7 @@ if arg == "config" : print 'total.label Total' elif arg == "fichier" : - file = open(fichier,'w') + file = open('%s.next' % fichier,'w') sys.path.append('/usr/scripts/gestion') from ldap_crans import crans_ldap @@ -60,5 +60,6 @@ elif arg == "fichier" : file.write("total.value %d\n" % total) file.close() + os.system('mv %s.next %s' % (fichier, fichier)) else : os.system('cat %s' % fichier)