Fixed local method call

master
root 3 years ago
parent a782c69cd6
commit 1796898e15

@ -70,13 +70,11 @@ def create_obj(client, method_name):
ns_type = 1
param = 1
pref = ""
sd = client.sd[sd_item]
# get parameter type
operation = sd.ports[num_port][operation_from_port]
info = operation.methods.get(method_name)
info = operation.method(method_name)
if not info:
raise MethodNotFound(method_name)
type_op = info.binding.input.param_defs(info)[param][inf_param]

@ -129,8 +129,8 @@ class CommonMethods(MethodsInterface):
continue
elif answ == "use new":
try:
with open(orig, 'w', encoding="UTF-8") as fd:
fd.write(readFile(data[i_cfgname]))
with open(orig, 'w', encoding="ascii") as fd:
fd.write(readFile(data[i_cfgname], encoding="ascii"))
os.unlink(data[i_cfgname])
if filesApply:
try:

@ -268,9 +268,6 @@ def call_method(metaObject, args, unknown_args, colorPrint):
"""
Function for call method through metaObject and args
"""
print("METHODCALL")
print(metaObject)
print(dir(metaObject))
method_name = args.method
stdin_passwd = args.stdin_passwd
method_view_name = method_name + '_view'

@ -91,7 +91,7 @@ class Variables(MethodsInterface):
else:
self.printDefault(removeQuotes(prevVal))
return True
filter_names = {'all': None,
filter_names = {'all': lambda x: x,
'userset': lambda x: x[LOCATION],
'writable': lambda x: x[MODE].startswith("w"),
'system': lambda x: x[LOCATION] == "system",

Loading…
Cancel
Save