convert to browser2
This commit is contained in:
parent
e21e60a49b
commit
014234576e
3 changed files with 61 additions and 81 deletions
|
|
@ -45,13 +45,10 @@ class AlloRestoBackend(BaseBackend, ICapBank):
|
|||
self.config['password'].get())
|
||||
|
||||
def iter_accounts(self):
|
||||
with self.browser:
|
||||
for account in self.browser.get_accounts_list():
|
||||
yield account
|
||||
return self.browser.get_accounts_list()
|
||||
|
||||
def get_account(self, _id):
|
||||
with self.browser:
|
||||
account = self.browser.get_account(_id)
|
||||
account = self.browser.get_account(_id)
|
||||
|
||||
if account:
|
||||
return account
|
||||
|
|
@ -59,10 +56,8 @@ class AlloRestoBackend(BaseBackend, ICapBank):
|
|||
raise AccountNotFound()
|
||||
|
||||
def iter_history(self, account):
|
||||
with self.browser:
|
||||
return self.browser.get_history(account)
|
||||
return self.browser.get_history(account)
|
||||
|
||||
def iter_coming(self, account):
|
||||
with self.browser:
|
||||
return self.browser.get_coming(account)
|
||||
return self.browser.get_coming(account)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue