diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index 2ed02656..014102bc 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -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'): diff --git a/confluent_server/confluent/syncfiles.py b/confluent_server/confluent/syncfiles.py index b2f5fb63..86c89e45 100644 --- a/confluent_server/confluent/syncfiles.py +++ b/confluent_server/confluent/syncfiles.py @@ -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]