support when sometimes 'coming' value is '-'
This commit is contained in:
parent
74fbf865f2
commit
1959786f68
1 changed files with 7 additions and 2 deletions
|
|
@ -20,8 +20,9 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from urlparse import urlparse, parse_qsl
|
from urlparse import urlparse, parse_qsl
|
||||||
from decimal import Decimal
|
from decimal import Decimal, InvalidOperation
|
||||||
|
|
||||||
|
from weboob.capabilities import NotAvailable
|
||||||
from weboob.capabilities.bank import Account
|
from weboob.capabilities.bank import Account
|
||||||
from weboob.tools.browser import BasePage
|
from weboob.tools.browser import BasePage
|
||||||
|
|
||||||
|
|
@ -45,7 +46,11 @@ class ProAccountsList(BasePage):
|
||||||
account.id = self.parser.tocleanstring(cols[self.COL_ID])
|
account.id = self.parser.tocleanstring(cols[self.COL_ID])
|
||||||
account.label = self.parser.tocleanstring(cols[self.COL_LABEL])
|
account.label = self.parser.tocleanstring(cols[self.COL_LABEL])
|
||||||
account.balance = Decimal(self.parser.tocleanstring(cols[self.COL_BALANCE]))
|
account.balance = Decimal(self.parser.tocleanstring(cols[self.COL_BALANCE]))
|
||||||
account.coming = Decimal(self.parser.tocleanstring(cols[self.COL_COMING]))
|
try:
|
||||||
|
account.coming = Decimal(self.parser.tocleanstring(cols[self.COL_COMING]))
|
||||||
|
except InvalidOperation:
|
||||||
|
self.logger.warning('Unable to parse coming value', exc_info=True)
|
||||||
|
account.coming = NotAvailable
|
||||||
account._link_id = None
|
account._link_id = None
|
||||||
account._stp = None
|
account._stp = None
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue