mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
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:
committed by
Christian Decker
parent
71581ff96e
commit
859070a5ed
@@ -129,7 +129,12 @@ class NodeFactory(object):
|
|||||||
'--log-file={}/valgrind-errors.%p'.format(node.daemon.lightning_dir)
|
'--log-file={}/valgrind-errors.%p'.format(node.daemon.lightning_dir)
|
||||||
] + node.daemon.cmd_line
|
] + node.daemon.cmd_line
|
||||||
|
|
||||||
|
try:
|
||||||
node.daemon.start()
|
node.daemon.start()
|
||||||
|
except:
|
||||||
|
node.daemon.stop()
|
||||||
|
raise
|
||||||
|
|
||||||
# Cache `getinfo`, we'll be using it a lot
|
# Cache `getinfo`, we'll be using it a lot
|
||||||
node.info = node.rpc.getinfo()
|
node.info = node.rpc.getinfo()
|
||||||
return node
|
return node
|
||||||
|
|||||||
Reference in New Issue
Block a user