Merge branch 'bugfix/stdoutflush' into 'master'

Stdoutflush: Flushing stdout to avoid issues with 64k char limits

See merge request idf/esp-idf!4698
This commit is contained in:
Angus Gratton 2019-06-26 10:07:41 +08:00
commit 12f4541f19

View file

@ -82,6 +82,7 @@ def run_server(kconfig, sdkconfig, default_version=MAX_PROTOCOL_VERSION):
# V2 onwards: separate visibility from version
json.dump({"version": default_version, "values": config_dict, "ranges": ranges_dict, "visible": visible_dict}, sys.stdout)
print("\n")
sys.stdout.flush()
while True:
line = sys.stdin.readline()
@ -93,6 +94,7 @@ def run_server(kconfig, sdkconfig, default_version=MAX_PROTOCOL_VERSION):
response = {"version": default_version, "error": ["JSON formatting error: %s" % e]}
json.dump(response, sys.stdout)
print("\n")
sys.stdout.flush()
continue
before = confgen.get_json_values(config)
before_ranges = get_ranges(config)
@ -142,6 +144,7 @@ def run_server(kconfig, sdkconfig, default_version=MAX_PROTOCOL_VERSION):
response["error"] = error
json.dump(response, sys.stdout)
print("\n")
sys.stdout.flush()
def handle_request(deprecated_options, config, req):