mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
Use check_output
instead of run
This is shorter and more readable Suggested-By: @cdecker
This commit is contained in:
parent
03e7a03a09
commit
77989b106f
1 changed files with 2 additions and 4 deletions
|
@ -612,10 +612,8 @@ class LightningD(TailableProc):
|
||||||
self.opts = LIGHTNINGD_CONFIG.copy()
|
self.opts = LIGHTNINGD_CONFIG.copy()
|
||||||
|
|
||||||
# Query the version of the cln-binary
|
# Query the version of the cln-binary
|
||||||
cln_version_proc = subprocess.run(
|
cln_version_proc = subprocess.check_output([self.executable, "--version"])
|
||||||
[self.executable, "--version"],
|
self.cln_version = NodeVersion(cln_version_proc.decode('ascii').strip())
|
||||||
stdout=subprocess.PIPE)
|
|
||||||
self.cln_version = NodeVersion(cln_version_proc.stdout.decode('ascii').strip())
|
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
'lightning-dir': lightning_dir,
|
'lightning-dir': lightning_dir,
|
||||||
|
|
Loading…
Add table
Reference in a new issue