From be3770956c5a884c448cf7db2fa78229f0c04b59 Mon Sep 17 00:00:00 2001 From: n07070 Date: Tue, 15 Mar 2022 14:49:05 +0100 Subject: [PATCH] Ajout d'un try/except' --- src/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index a1d3c9b..595564b 100644 --- a/src/main.py +++ b/src/main.py @@ -87,7 +87,11 @@ def api_print_sms(): flash(e) redirect(url_for('index')) - flash(web.print_sms(txt,sign)) + try: + web.print_sms(txt,sign) + except Exception as e: + pass + return redirect(url_for('index')) @app.route('/api/print/image', methods=['POST'])