New passwords

develop
parent df3fd65960
commit a3b5c858c7

@ -268,7 +268,7 @@ def https_server(client, args, unknown_args, url, clVarsCore, wait_thread):
client.frame_period = clVarsCore.Get('core.cl_core_get_frame_period')
except:
client.frame_period = 2
method_result = call_method(client, args, wait_thread)
method_result = call_method(client, args, unknown_args, wait_thread)
if method_result:
client.no_progress = args.no_progress
try:

@ -358,7 +358,7 @@ def analysis(client, sid, s):
def get_message(client, item, sid, pid):
""" get one message by its type """
for case in switch(item.type):
if case('normal'):
if case('normal') or case('plain'):
# sys.stdout.flush()
# sys.stdout.write('\x1b[1;33m' + item.message + '\033[0m')
if item.message:

@ -22,7 +22,7 @@ import urllib2
from calculate.core.server.methods_func import get_method_argparser, \
collect_object, RawAndDefaultsHelpFormatter, \
check_result_msg, get_param_pwd
check_result_msg, get_param_pwd, getErrorOnParam
def parse():
parser = argparse.ArgumentParser(add_help=False,
@ -104,7 +104,7 @@ def get_view(client, method, sid, view_params):
raise Exception(1)
return view
def call_method(client, args, wait_thread):
def call_method(client, args, unknown_args, wait_thread):
method = args.method
no_questions = args.no_questions
stdin_passwd = args.stdin_passwd
@ -115,7 +115,7 @@ def call_method(client, args, wait_thread):
method_parser = get_method_argparser(view, args)
param_object = _create_obj(client, method)
try:
args, unknown_args = method_parser.parse_known_args()
args, unknown_args = method_parser.parse_known_args(unknown_args)
except SystemExit:
raise Exception(1)
for i in unknown_args:
@ -182,10 +182,7 @@ def call_method(client, args, wait_thread):
for Group in view.groups.GroupField:
for field in Group.fields.Field:
if field.name == error.field:
if field.opt.shortopt or field.opt.longopt:
params_text += _('Wrong option ')
params_text += ', '.join(filter(None,
[field.opt.shortopt, field.opt.longopt]))+'. '
params_text += getErrorOnParam(args,field)
red = '\033[31m * \033[0m'
_print ('\r' + red + params_text + error.message)
return None

@ -97,7 +97,7 @@ def client_list_methods(client):
RES = 0 # Access to result
COM = 0 # Getting command line
METH = 1 # Getting method line
TR_METH = 2 # Translate method name
TR_METH = 3 # Translate method name
results = client.service.get_methods(client.sid, client_types)
if not results:
print _('No methods available')
@ -111,8 +111,10 @@ def client_list_methods(client):
print _("You can execute:"), _('use'), '--method'
group_dict = {}
for group in results.stringArray:
if len (group.string) == 3:
if len (group.string) == 4:
group_dict[group.string[METH]] = group.string[TR_METH]
if len (group.string) == 3:
group_dict[group.string[METH]] = group.string[TR_METH-1]
sort_keys = group_dict.keys()
sort_keys.sort()
for key in sort_keys:

Loading…
Cancel
Save