[core/input] Handle exceptions for non-existent commands
This commit is contained in:
parent
944b223f1e
commit
52e5ad7b43
2 changed files with 15 additions and 1 deletions
|
@ -44,6 +44,10 @@ def __invoke(event, callback):
|
|||
if callable(cb):
|
||||
cb(event)
|
||||
else:
|
||||
util.cli.execute(cb, wait=False)
|
||||
try:
|
||||
util.cli.execute(cb, wait=False)
|
||||
except Exception as e:
|
||||
logging.error('failed to invoke callback: {}'.format(e))
|
||||
return
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue