From 937aab00af591948902181e943208236f5f161dc Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Mon, 29 Jun 2015 18:15:22 +0200 Subject: [PATCH] creer_compte_wiki: creer_compte renvoie un tuple --- wiki/creer_compte_wiki.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wiki/creer_compte_wiki.py b/wiki/creer_compte_wiki.py index 46a8834e..7a2c538f 100755 --- a/wiki/creer_compte_wiki.py +++ b/wiki/creer_compte_wiki.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/bin/bash /usr/scripts/python.sh # -*- coding: utf-8 -*- # Script de création de compte sur le wiki @@ -13,9 +13,10 @@ from email.MIMEText import MIMEText from email.MIMEMultipart import MIMEMultipart from email.Encoders import encode_7or8bit -sys.path.append("/usr/scripts/gestion") -from affich_tools import coul, prompt, cprint -from user_tests import getuser +if '/usr/scripts' not in sys.path: + sys.path.append("/usr/scripts") +from gestion.affich_tools import coul, prompt, cprint +from gestion.user_tests import getuser bugmail = ["root@crans.org"] bugreport = u""" @@ -83,8 +84,8 @@ correctement configuré (en %s).""" % (locale.getdefaultlocale()[1]) msg.attach(txt) msg.attach(html) send(msg, user) - return coul(u"Erreur inconnue\n", "rouge") + \ - u"Un rapport de bug a été automatiquement envoyé. Réessayez plus tard." + return (u"Erreur inconnue\nUn rapport de bug a été envoyé." + u"Réessayez plus tard."), False if __name__ == '__main__': try: