aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2016-04-13 16:54:07 +0930
committerRusty Russell <rusty@rustcorp.com.au>2016-04-13 16:54:07 +0930
commitd12760b16ac30734b5e3b047df8aaf6564e927db (patch)
treee21262573876b0ba1bd7d550145164c43e74eb03 /qa/rpc-tests/test_framework
parent85c807c9ead3215021503348e75851900dfa08db (diff)
rpc-tests: handle KeyError nicely in test_framework.py
btcdrak wrote this for me. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'qa/rpc-tests/test_framework')
-rwxr-xr-xqa/rpc-tests/test_framework/test_framework.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py
index 19ee472609..3b08cd1384 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])