mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Flashing bugfix
This commit is contained in:
parent
682dd721fe
commit
557a46f0b1
2 changed files with 5 additions and 4 deletions
|
@ -120,7 +120,6 @@ def win_msg(astr):
|
||||||
if os.isatty(1):
|
if os.isatty(1):
|
||||||
print('\n' + colorize(_("Success: "), 'green') + astr + '\n')
|
print('\n' + colorize(_("Success: "), 'green') + astr + '\n')
|
||||||
|
|
||||||
del win[:]
|
|
||||||
win.append(astr)
|
win.append(astr)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ from twisted.internet import reactor
|
||||||
from twisted.application import internet,service
|
from twisted.application import internet,service
|
||||||
from txrestapi.resource import APIResource
|
from txrestapi.resource import APIResource
|
||||||
from yunohost import YunoHostError, YunoHostLDAP, str_to_func, colorize, pretty_print_dict, display_error, validate, win, parse_dict
|
from yunohost import YunoHostError, YunoHostLDAP, str_to_func, colorize, pretty_print_dict, display_error, validate, win, parse_dict
|
||||||
|
import yunohost
|
||||||
|
|
||||||
if not __debug__:
|
if not __debug__:
|
||||||
import traceback
|
import traceback
|
||||||
|
@ -65,7 +66,7 @@ def http_exec(request, **kwargs):
|
||||||
path = path.replace(dynamic_key, '{'+ k +'}')
|
path = path.replace(dynamic_key, '{'+ k +'}')
|
||||||
given_args[k] = [v]
|
given_args[k] = [v]
|
||||||
|
|
||||||
msg(given_args)
|
#msg(given_args)
|
||||||
# Sanitize arguments
|
# Sanitize arguments
|
||||||
dict = action_dict[request.method +' '+ path]
|
dict = action_dict[request.method +' '+ path]
|
||||||
if 'arguments' in dict: possible_args = dict['arguments']
|
if 'arguments' in dict: possible_args = dict['arguments']
|
||||||
|
@ -114,8 +115,9 @@ def http_exec(request, **kwargs):
|
||||||
result = func(**validated_args)
|
result = func(**validated_args)
|
||||||
if result is None:
|
if result is None:
|
||||||
result = {}
|
result = {}
|
||||||
if len(win) > 0:
|
if len(yunohost.win) > 0:
|
||||||
result['win'] = win
|
result['win'] = yunohost.win
|
||||||
|
yunohost.win = []
|
||||||
|
|
||||||
# Build response
|
# Build response
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
|
Loading…
Add table
Reference in a new issue