except CallErrors from ConsoleApplication
This commit is contained in:
parent
8316971aba
commit
5098c4c9d2
1 changed files with 6 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ import re
|
||||||
from inspect import getargspec
|
from inspect import getargspec
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
|
import weboob
|
||||||
from weboob.modules import BackendsConfig
|
from weboob.modules import BackendsConfig
|
||||||
|
|
||||||
from .base import BaseApplication
|
from .base import BaseApplication
|
||||||
|
|
@ -143,7 +144,11 @@ class ConsoleApplication(BaseApplication):
|
||||||
sys.stderr.write("Command '%s' takes %d arguments.\n" % (command, nb_min_args))
|
sys.stderr.write("Command '%s' takes %d arguments.\n" % (command, nb_min_args))
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
command_result = func(*args)
|
try:
|
||||||
|
command_result = func(*args)
|
||||||
|
except weboob.CallErrors, errors:
|
||||||
|
logging.error(errors)
|
||||||
|
return 1
|
||||||
|
|
||||||
# Process result
|
# Process result
|
||||||
if isinstance(command_result, Results):
|
if isinstance(command_result, Results):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue