Skip to content

Commit 1a4cac0

Browse files
committed
Catch and print python exceptions when stopping nodes
Otherwise the code at the bottom is never executed when nodes crash, leading to no output of debug.log files on Travis.
1 parent a99d259 commit 1a4cac0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

qa/rpc-tests/test_framework/test_framework.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,12 @@ def main(self):
175175

176176
if not self.options.noshutdown:
177177
print("Stopping nodes")
178-
stop_nodes(self.nodes)
178+
try:
179+
stop_nodes(self.nodes)
180+
except BaseException as e:
181+
success = False
182+
print("Unexpected exception caught during shutdown: " + repr(e))
183+
traceback.print_tb(sys.exc_info()[2])
179184
else:
180185
print("Note: dashds were not stopped and may still be running")
181186

0 commit comments

Comments
 (0)