diff --git a/controle_cotisation/main.py b/controle_cotisation/main.py index 1eec9be..cd71cf2 100755 --- a/controle_cotisation/main.py +++ b/controle_cotisation/main.py @@ -330,7 +330,6 @@ def validate(member): pass set_file_content(WORKDIR+"/validé/"+filename+".tex", latexfile) os.system("cd {} && pdflatex {}".format(WORKDIR+"/validé/", filename+".tex")) - os.remove(WORKDIR+"/transition/"+member) # Preparing mail mailheaders = get_file_content_all(RECEPT_MAIL_HEADERS) + "\n" @@ -347,6 +346,9 @@ def validate(member): sendmail_with_attachment(mailheaders, mailtext, mailtattach, data, ending) + # The end + os.remove(WORKDIR+"/transition/"+member) + def validate_members(): for record in os.listdir(WORKDIR+"/transition"): validate(record)