From 2bcce4911f5bd0291e3aa6fde09a61697ba8fb83 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Mon, 29 Jun 2015 00:22:13 +0200 Subject: [PATCH] =?UTF-8?q?Quand=20une=20facture=20est=20control=C3=A9e,?= =?UTF-8?q?=20on=20affichel'erreur=20au=20lieu=20de=20planter=20gest=5Fcra?= =?UTF-8?q?ns,=20en=20attendant=20une=20solution=20d=C3=A9finitive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/gest_crans.py | 7 ++++++- gestion/ldap_crans.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gestion/gest_crans.py b/gestion/gest_crans.py index 308f359a..7e95560f 100755 --- a/gestion/gest_crans.py +++ b/gestion/gest_crans.py @@ -2267,7 +2267,12 @@ def modif_adher(adher): if no: return modif_adher(adher) for m in adher.machines(): m.delete("Depart du campus") - adher.delete("Depart du campus") + try: + adher.delete("Depart du campus") + except EnvironmentError, c: + arg = u'--title "Destruction du compte" ' + arg += u'--msgbox "%s\n\n\n" 0 0' % to_unicode(c.args[0]) + dialog(arg) return else: diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 697690eb..871e2501 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -4256,7 +4256,7 @@ class Facture(BaseClasseCrans): def delete(self, comment=''): """Suppression de la facture""" if self.controle(): - raise EnvironmentError(u"La facture a déjà été controlée") + raise EnvironmentError(u"La facture a déjà été controlée, contacter trésorerie") self.__proprietaire = None self._delete(self.dn, comment)