Fix bug #401
Some accounts do have "coming" in bnporc but with simple text instead of a <a> tag Signed-off-by: Pierre Mazière <pierre.maziere@gmail.com> Signed-off-by: Romain Bignon <romain@peerfuse.org>
This commit is contained in:
parent
a4dbaf01c5
commit
6779c2942b
1 changed files with 6 additions and 3 deletions
|
|
@ -56,9 +56,12 @@ class AccountsList(BasePage):
|
|||
account.coming = 0.0
|
||||
else:
|
||||
a = td.findall('a')
|
||||
coming = a[0].text
|
||||
coming = coming.replace('.','').replace(',','.')
|
||||
account.coming = float(coming)
|
||||
if len(a) == 0:
|
||||
account.coming = 0.0
|
||||
else:
|
||||
coming = a[0].text
|
||||
coming = coming.replace('.','').replace(',','.')
|
||||
account.coming = float(coming)
|
||||
|
||||
l.append(account)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue