2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-12 02:52:30 +00:00

Correct mistakes in syncfile option passing

This commit is contained in:
Jarrod Johnson
2021-10-07 18:23:57 -04:00
parent 3f7a7d09dd
commit 52a7921676
2 changed files with 4 additions and 2 deletions

View File

@@ -344,7 +344,7 @@ def handle_request(env, start_response):
if 'GET' == operation:
status, output = syncfiles.get_syncresult(nodename)
output = json.dumps(output)
start_response(status, (('Content-Type', 'application/json')))
start_response(status, (('Content-Type', 'application/json'),))
yield output
return
elif env['PATH_INFO'].startswith('/self/remoteconfig/status'):

View File

@@ -142,11 +142,13 @@ def sync_list_to_node(sl, node, suffixes):
raise
finally:
shutil.rmtree(targdir)
if not isinstance(output, str):
output = output.decode('utf8')
retval = {
'options': sl.optmap,
'output': output,
}
return output # need dictionary with output and options
return retval # need dictionary with output and options
def stage_ent(currmap, ent, targdir, appendexist=False):
dst = currmap[ent]