don't crash if there is an account without account number
This commit is contained in:
parent
535d6efc47
commit
f2d0b514c6
1 changed files with 9 additions and 0 deletions
|
|
@ -121,6 +121,15 @@ class AccountsPage(BasePage):
|
|||
|
||||
args = self.js2args(link.attrib['onclick'])
|
||||
|
||||
self.logger.debug('Args: %r' % args)
|
||||
if not 'paramNumCompte' in args:
|
||||
try:
|
||||
label = unicode(table.xpath('./caption')[0].text.strip())
|
||||
except Exception:
|
||||
label = 'Unable to determine'
|
||||
self.logger.warning('Unable to get account ID for %r' % label)
|
||||
continue
|
||||
|
||||
account.id = args['paramNumCompte']
|
||||
account.label = unicode(table.xpath('./caption')[0].text.strip())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue