DBG_PRINTER: n'imprime pas pour de vrai
This commit is contained in:
parent
62fe08696e
commit
c636fcca6d
2 changed files with 5 additions and 3 deletions
|
@ -39,8 +39,7 @@ except AttributeError:
|
|||
handler.formatter = formatter
|
||||
logger.addHandler(handler)
|
||||
|
||||
DEBUG = bool(os.getenv('DEBUG', False))
|
||||
DECOUVERT_AUTHORISE = config_impression.decouvert
|
||||
DEBUG = bool(os.getenv('DBG_PRINTER', False))
|
||||
|
||||
class Option(object):
|
||||
# Valeur par défaut
|
||||
|
@ -359,7 +358,7 @@ class impression(object):
|
|||
adh = adh[1:]
|
||||
adh = self._get_adh(adh[0])
|
||||
self._calcule_prix() # Normalement inutile, mais évite les races
|
||||
if (self._prix > (adh.solde() - DECOUVERT_AUTHORISE)):
|
||||
if (self._prix > (adh.solde() - config_impression.decouvert)):
|
||||
raise SoldeInsuffisant
|
||||
adh.solde(-self._prix, "impression(%d): %s par %s" % (self._jid,self._fichier,self._adh))
|
||||
adh.save()
|
||||
|
|
|
@ -17,3 +17,6 @@ export DBG_MAIL=`whoami`+test@crans.org
|
|||
|
||||
# Serveur freeradius de test ?
|
||||
export DBG_FREERADIUS=1
|
||||
|
||||
# Imprime pour de vrai ?
|
||||
export DBG_PRINTER=1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue