Commit 51bd679b authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[societegenerale] do not stop iter account when transfer page is not available

when transfer page is in maintenance:
* it raise Client Error Forbidden ...
* transfer json page raise browserunavailable
parent 1cca0fe4
......@@ -24,10 +24,10 @@ from decimal import Decimal
from dateutil.relativedelta import relativedelta
from weboob.browser import LoginBrowser, URL, need_login, StatesMixin
from weboob.exceptions import BrowserIncorrectPassword, ActionNeeded
from weboob.exceptions import BrowserIncorrectPassword, ActionNeeded, BrowserUnavailable
from weboob.capabilities.bank import Account, TransferBankError
from weboob.capabilities.base import find_object, NotAvailable
from weboob.browser.exceptions import BrowserHTTPNotFound
from weboob.browser.exceptions import BrowserHTTPNotFound, ClientError
from weboob.capabilities.profile import ProfileMissing
from .pages.accounts_list import (
......@@ -163,7 +163,7 @@ class SocieteGenerale(LoginBrowser, StatesMixin):
account_ibans = {}
try:
self.json_transfer.go()
except TransferBankError:
except (TransferBankError, ClientError, BrowserUnavailable):
# some user can't access this page
pass
else:
......
......@@ -45,7 +45,7 @@ class TransferJson(LoggedPage, JsonPage):
if Dict('commun/statut')(self.doc).upper() == 'NOK':
if self.doc['commun'].get('action'):
raise TransferBankError(message=Dict('commun/action')(self.doc))
elif self.doc['commun'].get('raison') == 'err_tech':
elif self.doc['commun'].get('raison') in ('err_tech', 'err_is'):
# on SG website, there is unavalaible message 'Le service est momentanément indisponible.'
raise BrowserUnavailable()
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment