From 007b690c8efc863c6c7cd4e0fa5677f9da26d106 Mon Sep 17 00:00:00 2001 From: Mike Roberts <2947595+m-roberts@users.noreply.github.com> Date: Wed, 29 Jan 2020 17:38:06 +0000 Subject: [PATCH] Fix print_data --- python/get_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/get_data.py b/python/get_data.py index 1cc61fe..4834dd1 100644 --- a/python/get_data.py +++ b/python/get_data.py @@ -2,7 +2,7 @@ import fitbit import json from token_handler import set_client_id, set_debug_state, print_json, read_tokens, write_tokens -from sys import stdin +from sys import stdin, stdout import select ############################################## @@ -17,7 +17,7 @@ def print_data(resource, data, goal, debug=False): print(json.dumps({"type": "data", "resource": resource, "values": {"data": data, "goal": goal}})) - sys.stdout.flush() + stdout.flush() def print_empty_resource(resource):