diff --git a/modules/barclays/browser.py b/modules/barclays/browser.py index aee4a5c8ccd7b83cc002fb35d1ab5c0647567919..b42fc0244bbcf9cdd56fd864f9b2e86819c6fecf 100644 --- a/modules/barclays/browser.py +++ b/modules/barclays/browser.py @@ -133,6 +133,11 @@ def iter_accounts(self): traccounts = [] for account in accounts: + if account._btn is None: + # we can't access to account details without this button + traccounts.append(account) + continue + if account.type == Account.TYPE_CHECKING: # Only checking accounts have an IBAN self._go_to_account(account) @@ -181,6 +186,8 @@ def iter_history(self, account): return [] elif account.type in (Account.TYPE_LOAN, Account.TYPE_REVOLVING_CREDIT): return [] + if account._btn is None: + return [] self._go_to_account(account) @@ -222,6 +229,8 @@ def iter_history(self, account): def iter_coming(self, account): if account.type != Account.TYPE_CARD: raise NotImplementedError() + if account._btn is None: + return [] self._go_to_account(account) return self.page.iter_history() @@ -230,6 +239,8 @@ def iter_coming(self, account): def iter_investments(self, account): if account.type not in (Account.TYPE_LIFE_INSURANCE, Account.TYPE_MARKET): raise NotImplementedError() + if account._btn is None: + return [] self._go_to_account(account)