Skip to content

Commit

Permalink
Print result of RPC call in test only when PYTHON_DEBUG is set
Browse files Browse the repository at this point in the history
  • Loading branch information
per-gron committed Dec 16, 2017
1 parent 8993edf commit d4ab94a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qa/rpc-tests/test_framework/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d4ab94a

Please sign in to comment.