From a1440a9f996f8d018775427416cdeba74841fd68 Mon Sep 17 00:00:00 2001 From: jgstew Date: Tue, 27 Feb 2024 11:58:29 -0500 Subject: [PATCH] tweak --- examples/session_relevance_from_file_json.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/session_relevance_from_file_json.py b/examples/session_relevance_from_file_json.py index 8b91037..c0ddb78 100644 --- a/examples/session_relevance_from_file_json.py +++ b/examples/session_relevance_from_file_json.py @@ -5,6 +5,7 @@ requires `besapi`, install with command `pip install besapi` """ + import json import besapi @@ -23,13 +24,15 @@ def main(): result = bes_conn.post(bes_conn.url("query"), data) - print(result) + if __debug__: + print(result) json_result = json.loads(str(result)) json_string = json.dumps(json_result, indent=2) - print(json_string) + if __debug__: + print(json_string) with open( "examples/session_relevance_query_from_file_output.json", "w"