Commit 8be4a4ab authored by Romain Bignon's avatar Romain Bignon Committed by Vincent A

boobank: support DecoupledValidation during add_recipient

parent 5560adb8
......@@ -28,7 +28,7 @@ from decimal import Decimal, InvalidOperation
from weboob.browser.browsers import APIBrowser
from weboob.browser.profiles import Weboob
from weboob.exceptions import BrowserHTTPError, CaptchaQuestion
from weboob.exceptions import BrowserHTTPError, CaptchaQuestion, DecoupledValidation
from weboob.core.bcall import CallErrors
from weboob.capabilities.base import empty, find_object
from import (
......@@ -483,6 +483,17 @@ class Boobank(CaptchaMixin, ReplApplication):
next(iter('add_recipient', error.recipient, **params)))
except CallErrors as e:
elif isinstance(error, DecoupledValidation):
# XXX for now, assume we are in a add_recipient process.
params = {'backends': backend,
'resume': True
next(iter('add_recipient', error.resource, **params)))
except CallErrors as e:
elif isinstance(error, TransferInvalidAmount):
print(u'Error(%s): %s' % (, to_unicode(error) or 'The transfer amount is invalid'), file=self.stderr)
elif isinstance(error, TransferInvalidLabel):
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