Commit 2fa8ef55 authored by Romain Bignon's avatar Romain Bignon

ConsoleApplication: handle error NeedInteractiveFor2FA

parent 73b004d0
......@@ -36,7 +36,7 @@ from weboob.core.repositories import IProgress
from weboob.exceptions import BrowserUnavailable, BrowserIncorrectPassword, BrowserForbidden, \
BrowserSSLError, BrowserQuestion, BrowserHTTPSDowngrade, \
ModuleInstallError, ModuleLoadError, NoAccountsException, \
ActionNeeded, CaptchaQuestion
ActionNeeded, CaptchaQuestion, NeedInteractiveFor2FA
from import Value, ValueBool, ValueFloat, ValueInt, ValueBackendPassword
from import to_unicode
from import unicode, long
......@@ -609,6 +609,8 @@ class ConsoleApplication(Application):
print(u'Error(%s): this feature is not supported yet by this backend.' %, file=self.stderr)
print(u' %s To help the maintainer of this backend implement this feature,' % (' ' * len(, file=self.stderr)
print(u' %s please contact us on the project mailing list' % (' ' * len(, file=self.stderr)
elif isinstance(error, NeedInteractiveFor2FA):
print(u'Error(%s): You have to run %s in interactive mode to perform a two-factor authentication' % (, self.APPNAME), file=self.stderr)
elif isinstance(error, UserError):
print(u'Error(%s): %s' % (, to_unicode(error)), file=self.stderr)
elif isinstance(error, MoreResultsAvailable):
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