add handler in applications
This commit is contained in:
parent
492dbd5fcc
commit
47887d5560
2 changed files with 7 additions and 2 deletions
|
|
@ -33,7 +33,7 @@ from weboob.capabilities.account import ICapAccount, Account, AccountRegisterErr
|
|||
from weboob.core.backendscfg import BackendAlreadyExists
|
||||
from weboob.core.modules import ModuleLoadError
|
||||
from weboob.core.repositories import ModuleInstallError
|
||||
from weboob.tools.browser import BrowserUnavailable, BrowserIncorrectPassword
|
||||
from weboob.tools.browser import BrowserUnavailable, BrowserIncorrectPassword, BrowserForbidden
|
||||
from weboob.tools.value import Value, ValueBool, ValueFloat, ValueInt
|
||||
from weboob.tools.misc import to_unicode
|
||||
|
||||
|
|
@ -477,6 +477,8 @@ class ConsoleApplication(BaseApplication):
|
|||
if not msg:
|
||||
msg = 'website is unavailable.'
|
||||
print >>sys.stderr, u'Error(%s): %s' % (backend.name, msg)
|
||||
elif isinstance(error, BrowserForbidden):
|
||||
print >>sys.stderr, u'Error(%s): %s' % (backend.name, msg or 'Forbidden')
|
||||
elif isinstance(error, NotImplementedError):
|
||||
print >>sys.stderr, u'Error(%s): this feature is not supported yet by this backend.' % backend.name
|
||||
print >>sys.stderr, u' %s To help the maintainer of this backend implement this feature,' % (' ' * len(backend.name))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue