|
|
|
@ -99,16 +99,15 @@ class CommonMethods(MethodsInterface):
|
|
|
|
|
pass
|
|
|
|
|
if (self.clVars.Get('cl_autoupdate_set') == 'on' or
|
|
|
|
|
origdata == newdata):
|
|
|
|
|
answ = "use new"
|
|
|
|
|
answ = "zap new" #was use new
|
|
|
|
|
elif dispatch_var in answ_map:
|
|
|
|
|
answ = answ_map.get(dispatch_var)
|
|
|
|
|
else:
|
|
|
|
|
orig_content = normalize_config(readFile(orig))
|
|
|
|
|
new_content = normalize_config(readFile(data[i_cfgname]))
|
|
|
|
|
if orig_content == new_content:
|
|
|
|
|
answ = "use new"
|
|
|
|
|
answ = "zap new" #was use new
|
|
|
|
|
else:
|
|
|
|
|
print("DEBUG dispatch conf")
|
|
|
|
|
for i, s in enumerate(list(process("diff", "-Nu",
|
|
|
|
|
orig, data[i_cfgname]))):
|
|
|
|
|
s = convert_console_to_xml(s)
|
|
|
|
@ -129,8 +128,8 @@ class CommonMethods(MethodsInterface):
|
|
|
|
|
continue
|
|
|
|
|
elif answ == "use new":
|
|
|
|
|
try:
|
|
|
|
|
with open(orig, 'w', encoding="ascii") as fd:
|
|
|
|
|
fd.write(readFile(data[i_cfgname], encoding="ascii"))
|
|
|
|
|
with open(orig, 'w') as fd:
|
|
|
|
|
fd.write(readFile(data[i_cfgname]))
|
|
|
|
|
os.unlink(data[i_cfgname])
|
|
|
|
|
if filesApply:
|
|
|
|
|
try:
|
|
|
|
@ -443,8 +442,8 @@ class Action(MethodsInterface):
|
|
|
|
|
return lambda dv: [dv.Get(x) if x not in (True, False) else x
|
|
|
|
|
for x in varnames]
|
|
|
|
|
|
|
|
|
|
reMethod = re.compile(r"^([A-Za-z]+)\.([A-Za-z0-9_]+)\(([^)]*)\)$")
|
|
|
|
|
reMessageVars = re.compile(r"\{([^}]+)\}")
|
|
|
|
|
reMethod = re.compile("^([A-Za-z]+)\.([A-Za-z0-9_]+)\(([^)]*)\)$")
|
|
|
|
|
reMessageVars = re.compile("\{([^}]+)\}")
|
|
|
|
|
|
|
|
|
|
def parseMethod(self, objs, dv, s, task):
|
|
|
|
|
"""
|
|
|
|
@ -744,7 +743,7 @@ class Action(MethodsInterface):
|
|
|
|
|
if "command" in action:
|
|
|
|
|
hideout = action.get("hideout", False)
|
|
|
|
|
cmdParam = [x.strip('"\'') for x
|
|
|
|
|
in re.findall(r'["\'][^"\']+["\']|\S+', action["command"])]
|
|
|
|
|
in re.findall('["\'][^"\']+["\']|\S+', action["command"])]
|
|
|
|
|
cmd = processProgress(*cmdParam)
|
|
|
|
|
for line in cmd.progress():
|
|
|
|
|
if not hideout:
|
|
|
|
@ -1160,7 +1159,7 @@ class CoreWsdl(CoreServiceInterface):
|
|
|
|
|
onlyShow='', default=None):
|
|
|
|
|
from .api_types import Message
|
|
|
|
|
|
|
|
|
|
re_clean = re.compile(r'\[(?:\d+;)?\d+m')
|
|
|
|
|
re_clean = re.compile('\[(?:\d+;)?\d+m')
|
|
|
|
|
messageObj = Message(
|
|
|
|
|
message_type=message_type,
|
|
|
|
|
message=(
|
|
|
|
|