fix parsing funding accounts

This commit is contained in:
Romain Bignon 2012-11-28 14:58:37 +01:00
commit 8c3d8c30b8

View file

@ -99,7 +99,7 @@ class IndexPage(BasePage):
account_type = self.ACCOUNT_TYPES.get(tds[1].text.strip(), Account.TYPE_UNKNOWN)
else:
a = tds[1].find('a')
m = re.match("^javascript:__doPostBack\('.*','HISTORIQUE_COMPTE&(\d+)'\)", a.attrib['href'])
m = re.match("^javascript:__doPostBack\('.*','HISTORIQUE_COMPTE&(\d+)'\)", a.attrib.get('href', ''))
if not m:
self.logger.warning('Unable to parse account %s' % (a.text.strip() if a.text is not None else ''))