From 404c00833673d8be80a8b9aa255017b59c8d6255 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 18 Sep 2020 09:27:12 +0200 Subject: [PATCH] nanterre: silence warning about bad regexp (#46763) --- zoo/zoo_nanterre/qf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zoo/zoo_nanterre/qf.py b/zoo/zoo_nanterre/qf.py index 73e866e..44f81ce 100644 --- a/zoo/zoo_nanterre/qf.py +++ b/zoo/zoo_nanterre/qf.py @@ -64,8 +64,8 @@ class QF(object): if response: for qf in response: try: - qf['annee_imposition'] = force_text(int(re.findall('(\d+)', qf['libelle'])[0]) - 1) - except: + qf['annee_imposition'] = force_text(int(re.findall(r'(\d+)', qf['libelle'])[0]) - 1) + except Exception: qf['annee_imposition'] = 'inconnue' return response, error -- 2.28.0