diff --git a/admin/controle_chartes_MA.py b/admin/controle_chartes_MA.py index bdf1f542..a16a0e73 100755 --- a/admin/controle_chartes_MA.py +++ b/admin/controle_chartes_MA.py @@ -46,7 +46,7 @@ if u'Bureau' not in cableur.droits(): # Lors des tests, on m'envoie tous les mails ! from socket import gethostname -debug = True +debug = False if gethostname().split(".")[0] == 'egon': debug = 'bos@crans.org' @@ -152,10 +152,10 @@ def spammer(): for adh in todo_list: to = adh.email() - if debug != None: - to = debug - connexion.sendmail("bureau@crans.org",to,config.txt_charte_MA % {'From' : "bureau@crans.org", 'To' : to}) - + if not debug: + connexion.sendmail("bureau@crans.org",to,config.txt_charte_MA % {'From' : "bureau@crans.org", 'To' : to}) + else: + print to def __usage(message=None): """ Comment ça marche ? """ cprint(__doc__ % { 'prog': sys.argv[0] })