Skip to content

Commit d12760b

Browse files
committed
rpc-tests: handle KeyError nicely in test_framework.py
btcdrak wrote this for me. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 85c807c commit d12760b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

qa/rpc-tests/test_framework/test_framework.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ def main(self):
142142
except AssertionError as e:
143143
print("Assertion failed: "+ str(e))
144144
traceback.print_tb(sys.exc_info()[2])
145+
except KeyError as e:
146+
print("key not found: "+ str(e))
147+
traceback.print_tb(sys.exc_info()[2])
145148
except Exception as e:
146149
print("Unexpected exception caught during testing: "+str(e))
147150
traceback.print_tb(sys.exc_info()[2])

0 commit comments

Comments
 (0)