Terminate LightningD if, for some reason, it doesn't start properly. This cleans up the environment for future test runs.

This commit is contained in:
cornwarecjp 2018-01-30 10:52:35 +01:00 committed by Christian Decker
parent 71581ff96e
commit 859070a5ed

View file

@ -129,7 +129,12 @@ class NodeFactory(object):
'--log-file={}/valgrind-errors.%p'.format(node.daemon.lightning_dir)
] + node.daemon.cmd_line
node.daemon.start()
try:
node.daemon.start()
except:
node.daemon.stop()
raise
# Cache `getinfo`, we'll be using it a lot
node.info = node.rpc.getinfo()
return node