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)