diff --git a/console/application/function.py b/console/application/function.py index 0fafa90..ab07778 100644 --- a/console/application/function.py +++ b/console/application/function.py @@ -443,10 +443,10 @@ def get_Frame(client, sid, pid): """ get all messages, until type is not endFrame (or Error) """ end_frame = 1 while end_frame: - current_frame = client.service[0].get_frame(sid, pid) + current_frame = client.service[0].get_frame(sid, pid, "console") while current_frame in [None, [], ""]: time.sleep(float(client.frame_period)) - current_frame = client.service[0].get_frame(sid, pid) + current_frame = client.service[0].get_frame(sid, pid, "console") for item in current_frame[0]: end_frame = get_message(client, item, sid, pid) @@ -466,7 +466,7 @@ def get_entire_frame(client, pid): current_frame = client.service.get_entire_frame(sid, pid) while current_frame in [None, [], ""]: time.sleep(1) - current_frame = client.service.get_frame(sid, pid) + current_frame = client.service.get_frame(sid, pid, "console") for item in current_frame[0]: end_frame = get_message(client, item, sid, pid) diff --git a/console/application/methods_func.py b/console/application/methods_func.py index 757fdbf..d6777db 100644 --- a/console/application/methods_func.py +++ b/console/application/methods_func.py @@ -34,10 +34,10 @@ def parse(): parser.add_argument( '--method', type=str, dest='method', help=_('call method')) parser.add_argument( - '-l', '--lang', type=str, dest='lang', + '--translate-language', type=str, dest='lang', help=_('translation language')) parser.add_argument( - '-p', '--port', type=int, default = '8888', dest='port', + '--port', type=int, default = '8888', dest='port', help=_('port number')) parser.add_argument( '--host', type=str, default = 'localhost', dest='host', @@ -56,7 +56,7 @@ def parse(): '--list-pid', action='store_true', default=False, dest='list_pid', help=_("view the list of running processes")) parser.add_argument( - '-d', '--dump', action='store_true', default=False, dest = 'dump', + '--dump', action='store_true', default=False, dest = 'dump', help=_('dump (to be used with option --list-pid)')) parser.add_argument( '--pid-result', type=int, metavar = 'PID', @@ -88,7 +88,7 @@ def parse(): '--no-progress', action='store_true', default=False, dest = 'no_progress', help=_('do not display the progress bar')) parser.add_argument( - '-P', action='store_true', default=False, + '--stdin-passwords', action='store_true', default=False, dest = 'stdin_passwd', help=_("use passwords from standard input for users accounts")) return parser @@ -140,7 +140,8 @@ def call_method(client, args, unknown_args, wait_thread): method_result.ReturnedMessage[0].type != "pid": wait_thread.stop() - check_res = check_result_msg(method_result, view, check_res) + check_res = check_result_msg(method_result, view, + check_res,args) if not check_res: return None else: @@ -186,7 +187,7 @@ def call_method(client, args, unknown_args, wait_thread): if field.name == error.field: params_text += getErrorOnParam(args,field) red = '\033[31m * \033[0m' - _print ('\r' + red + params_text + error.message) + _print ('\r' + red + params_text % error.message) return None wait_thread.stop() return method_result