On évite de laisser trainer un fichier vide.

darcs-hash:20070910053148-72cb0-0bf74316bb0a16039286b4d8f690f8682e41c428.gz
This commit is contained in:
salles 2007-09-10 07:31:48 +02:00
parent 401551fff7
commit 5ac048dbd9

View file

@ -38,7 +38,7 @@ if arg == "config" :
print 'total.label Total' print 'total.label Total'
elif arg == "fichier" : elif arg == "fichier" :
file = open(fichier,'w') file = open('%s.next' % fichier,'w')
sys.path.append('/usr/scripts/gestion') sys.path.append('/usr/scripts/gestion')
from ldap_crans import crans_ldap from ldap_crans import crans_ldap
@ -60,5 +60,6 @@ elif arg == "fichier" :
file.write("total.value %d\n" % total) file.write("total.value %d\n" % total)
file.close() file.close()
os.system('mv %s.next %s' % (fichier, fichier))
else : else :
os.system('cat %s' % fichier) os.system('cat %s' % fichier)