Commit 0c8540c6 authored by Damien Mat's avatar Damien Mat Committed by Vincent A

[fortuneo] Fix: unidecode needed for Py2

When '\xa0' char is in some form field, weboob compat decoding would crah in Py2 (eg: '5\xa0733,29')
parent d1fe88d2
......@@ -22,6 +22,7 @@ from __future__ import unicode_literals
import re
import sys
from datetime import date
from unidecode import unidecode
from dateutil.relativedelta import relativedelta
......@@ -433,6 +434,11 @@ class AccountHistoryPage(ActionNeededPage):
form['dateRechercheDebut'] = ( - relativedelta(years=2)).strftime('%d/%m/%Y')
form['nbrEltsParPage'] = '100'
# '�' char may be in here instead of a space char (eg: '5\xa0733,29')
form['montantSoldeDebut'] = unidecode(form['montantSoldeDebut'])
form['montantSoldeFin'] = unidecode(form['montantSoldeFin'])
return True
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