diff --git a/yunohost.py b/yunohost.py index 0dfb600d..bf8f0446 100644 --- a/yunohost.py +++ b/yunohost.py @@ -120,7 +120,6 @@ def win_msg(astr): if os.isatty(1): print('\n' + colorize(_("Success: "), 'green') + astr + '\n') - del win[:] win.append(astr) diff --git a/yunohost.tac b/yunohost.tac index 78308d66..fafbb268 100755 --- a/yunohost.tac +++ b/yunohost.tac @@ -15,6 +15,7 @@ from twisted.internet import reactor from twisted.application import internet,service from txrestapi.resource import APIResource from yunohost import YunoHostError, YunoHostLDAP, str_to_func, colorize, pretty_print_dict, display_error, validate, win, parse_dict +import yunohost if not __debug__: import traceback @@ -65,7 +66,7 @@ def http_exec(request, **kwargs): path = path.replace(dynamic_key, '{'+ k +'}') given_args[k] = [v] - msg(given_args) + #msg(given_args) # Sanitize arguments dict = action_dict[request.method +' '+ path] if 'arguments' in dict: possible_args = dict['arguments'] @@ -114,8 +115,9 @@ def http_exec(request, **kwargs): result = func(**validated_args) if result is None: result = {} - if len(win) > 0: - result['win'] = win + if len(yunohost.win) > 0: + result['win'] = yunohost.win + yunohost.win = [] # Build response if request.method == 'POST':