Support for accounts without "coming" in bnporc
This commit is contained in:
parent
ad588d5d1d
commit
879445ead2
1 changed files with 8 additions and 4 deletions
|
|
@ -49,10 +49,14 @@ class AccountsList(BasePage):
|
||||||
balance = balance.replace('.','').replace(',','.')
|
balance = balance.replace('.','').replace(',','.')
|
||||||
account.balance = float(balance)
|
account.balance = float(balance)
|
||||||
elif td.attrib.get('headers', '').startswith('Avenir'):
|
elif td.attrib.get('headers', '').startswith('Avenir'):
|
||||||
a = td.findall('a')
|
# Some accounts don't have a "coming"
|
||||||
coming = a[0].text
|
if td.text.strip() == '-':
|
||||||
coming = coming.replace('.','').replace(',','.')
|
account.coming = 0.0
|
||||||
account.coming = float(coming)
|
else:
|
||||||
|
a = td.findall('a')
|
||||||
|
coming = a[0].text
|
||||||
|
coming = coming.replace('.','').replace(',','.')
|
||||||
|
account.coming = float(coming)
|
||||||
|
|
||||||
l.append(account)
|
l.append(account)
|
||||||
return l
|
return l
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue