From d4ab94a6d945515ee58fcf869641d2bc530dc9d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20Gr=C3=B6n?= Date: Wed, 13 Dec 2017 07:42:10 +0000 Subject: [PATCH] Print result of RPC call in test only when PYTHON_DEBUG is set --- qa/rpc-tests/test_framework/util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 92e1b3996..20267521f 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -389,10 +389,12 @@ def wait_and_assert_operationid_status(node, myopid, in_status='success', in_err elif status == "success": txid = results[0]['result']['txid'] break - print('...returned status: {}'.format(status)) assert_equal(in_status, status) if errormsg is not None: assert(in_errormsg is not None) assert_equal(in_errormsg in errormsg, True) - print('...returned error: {}'.format(errormsg)) + if os.getenv("PYTHON_DEBUG", ""): + print('...returned status: {}'.format(status)) + if errormsg is not None: + print('...returned error: {}'.format(errormsg)) return txid