From d12760b16ac30734b5e3b047df8aaf6564e927db Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 13 Apr 2016 16:54:07 +0930 Subject: [PATCH] rpc-tests: handle KeyError nicely in test_framework.py btcdrak wrote this for me. Signed-off-by: Rusty Russell --- qa/rpc-tests/test_framework/test_framework.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index 19ee47260..3b08cd138 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -142,6 +142,9 @@ class BitcoinTestFramework(object): except AssertionError as e: print("Assertion failed: "+ str(e)) traceback.print_tb(sys.exc_info()[2]) + except KeyError as e: + print("key not found: "+ str(e)) + traceback.print_tb(sys.exc_info()[2]) except Exception as e: print("Unexpected exception caught during testing: "+str(e)) traceback.print_tb(sys.exc_info()[2])