Flashing bugfix

This commit is contained in:
Kload 2013-09-23 19:20:39 +00:00
parent 682dd721fe
commit 557a46f0b1
2 changed files with 5 additions and 4 deletions

View file

@ -120,7 +120,6 @@ def win_msg(astr):
if os.isatty(1):
print('\n' + colorize(_("Success: "), 'green') + astr + '\n')
del win[:]
win.append(astr)

View file

@ -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':