Commit d9b59d60 authored by Nicolas Joyard's avatar Nicolas Joyard

Compat python3 < 3.5

parent ed486209
......@@ -259,16 +259,15 @@ def extraire_mails_cada(app):
outf.write(pdf)
# Extraction du texte
pro = subprocess.run(['pdftotext', pdfname, '-'],
stdout=subprocess.PIPE,
out = subprocess.check_output(['pdftotext', pdfname, '-'],
encoding='utf-8')
# Vérification de la décision
if AVIS_INCOMPETENCE not in pro.stdout:
if AVIS_INCOMPETENCE not in out:
print('CADA %s: (!) décision inattendue' % cada_id)
# Extraction du député concerné
match = AVIS_RE_DEPUTE.search(pro.stdout)
match = AVIS_RE_DEPUTE.search(out)
if not match:
print('CADA %s: (!) nom député introuvable' % cada_id)
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment