[fix] Some missing

This commit is contained in:
ljf 2018-04-11 22:54:46 +02:00
parent 219f1c6262
commit fac50997dc
2 changed files with 6 additions and 1 deletions

View file

@ -542,7 +542,6 @@ def app_upgrade(auth, app=[], url=None, file=None):
"""
from yunohost.hook import hook_add, hook_remove, hook_exec, hook_callback
from yunohost.log import Journal
# Retrieve interface
is_api = msettings.get('interface') == 'api'

View file

@ -359,6 +359,12 @@ def hook_exec(path, args=None, raise_on_error=False, no_trace=False,
else:
logger.info(m18n.n('executing_script', script=path))
# Define output callbacks and call command
callbacks = (
lambda l: logger.info(l.rstrip()),
lambda l: logger.warning(l.rstrip()),
)
returncode = call_async_output(
command, callbacks, shell=False, cwd=chdir
)