bnporc adapt module to use Browser2

This commit is contained in:
Baptiste Delpey 2015-07-27 16:43:38 +02:00 committed by Romain Bignon
commit 138cc0cf8e

View file

@ -76,24 +76,20 @@ class BNPorcModule(Module, CapBank, CapMessages):
def get_account(self, _id): def get_account(self, _id):
if not _id.isdigit(): if not _id.isdigit():
raise AccountNotFound() raise AccountNotFound()
with self.browser: account = self.browser.get_account(_id)
account = self.browser.get_account(_id)
if account: if account:
return account return account
else: else:
raise AccountNotFound() raise AccountNotFound()
def iter_history(self, account): def iter_history(self, account):
with self.browser: return self.browser.iter_history(account)
return self.browser.iter_history(account)
def iter_coming(self, account): def iter_coming(self, account):
with self.browser: return self.browser.iter_coming_operations(account)
return self.browser.iter_coming_operations(account)
def iter_investment(self, account): def iter_investment(self, account):
with self.browser: return self.browser.iter_investment(account)
return self.browser.iter_investment(account)
def iter_transfer_recipients(self, ignored): def iter_transfer_recipients(self, ignored):
if self.config['website'].get() != 'pp': if self.config['website'].get() != 'pp':