creer_compte_wiki: creer_compte renvoie un tuple
This commit is contained in:
parent
9788cadfec
commit
937aab00af
1 changed files with 7 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
#! /usr/bin/env python
|
#!/bin/bash /usr/scripts/python.sh
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Script de création de compte sur le wiki
|
# 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.MIMEMultipart import MIMEMultipart
|
||||||
from email.Encoders import encode_7or8bit
|
from email.Encoders import encode_7or8bit
|
||||||
|
|
||||||
sys.path.append("/usr/scripts/gestion")
|
if '/usr/scripts' not in sys.path:
|
||||||
from affich_tools import coul, prompt, cprint
|
sys.path.append("/usr/scripts")
|
||||||
from user_tests import getuser
|
from gestion.affich_tools import coul, prompt, cprint
|
||||||
|
from gestion.user_tests import getuser
|
||||||
|
|
||||||
bugmail = ["root@crans.org"]
|
bugmail = ["root@crans.org"]
|
||||||
bugreport = u"""
|
bugreport = u"""
|
||||||
|
@ -83,8 +84,8 @@ correctement configuré (en %s).""" % (locale.getdefaultlocale()[1])
|
||||||
msg.attach(txt)
|
msg.attach(txt)
|
||||||
msg.attach(html)
|
msg.attach(html)
|
||||||
send(msg, user)
|
send(msg, user)
|
||||||
return coul(u"Erreur inconnue\n", "rouge") + \
|
return (u"Erreur inconnue\nUn rapport de bug a été envoyé."
|
||||||
u"Un rapport de bug a été automatiquement envoyé. Réessayez plus tard."
|
u"Réessayez plus tard."), False
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue