Use strings instead of integers internally for account IDs

This commit is contained in:
Laurent Bachelier 2010-11-12 18:40:23 +01:00
commit 024f217c8b
7 changed files with 24 additions and 33 deletions

View file

@ -104,14 +104,14 @@ class BNPorc(BaseBrowser):
return self.page.get_list()
def get_account(self, id):
assert isinstance(id, (int, long))
assert isinstance(id, (str, unicode))
if not self.is_on_page(pages.AccountsList):
self.location('/NSFR?Action=DSP_VGLOBALE')
l = self.page.get_list()
for a in l:
if long(a.id) == id:
if a.id == id:
return a
return None