do not crash if an account is not recognized

This commit is contained in:
Romain Bignon 2012-08-21 14:24:32 +02:00
commit 5681926213

View file

@ -86,6 +86,10 @@ class IndexPage(BasePage):
a = tds[1].find('a')
m = re.match("^javascript:__doPostBack\('.*','HISTORIQUE_COMPTE&(\d+)'\)", a.attrib['href'])
if not m:
self.logger.warning('Unable to parse account %s' % a.text.strip())
continue
account = Account()
account.id = m.group(1)
account.label = unicode(a.text.strip())