Skip to content

Commit dba074a

Browse files
authored
Merge pull request #294 from mkoura/use_explicit_out_format
feat(query_group): update CLI commands for output format
2 parents 0247ae1 + a483fc9 commit dba074a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cardano_clusterlib/query_group.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def get_utxo(
5959
Returns:
6060
List[structs.UTXOData]: A list of UTxO data.
6161
"""
62-
cli_args = ["utxo", "--out-file", "/dev/stdout"]
62+
cli_args = ["utxo", "--output-json"]
6363

6464
address_single = ""
6565
sort_results = False
@@ -300,7 +300,7 @@ def get_gov_action_deposit(self, pparams: dict[str, tp.Any] | None = None) -> in
300300
def get_stake_distribution(self) -> dict[str, float]:
301301
"""Return current aggregated stake distribution per stake pool."""
302302
# Stake pool values are displayed starting with line 2 of the command output
303-
result = self.query_cli(["stake-distribution"]).splitlines()[2:]
303+
result = self.query_cli(["stake-distribution", "--output-text"]).splitlines()[2:]
304304
stake_distribution: dict[str, float] = {}
305305
for pool in result:
306306
pool_id, stake = pool.split()
@@ -309,7 +309,7 @@ def get_stake_distribution(self) -> dict[str, float]:
309309

310310
def get_stake_pools(self) -> list[str]:
311311
"""Return the node's current set of stake pool ids."""
312-
stake_pools = self.query_cli(["stake-pools"]).splitlines()
312+
stake_pools = self.query_cli(["stake-pools", "--output-text"]).splitlines()
313313
return stake_pools
314314

315315
def get_leadership_schedule(
@@ -366,6 +366,7 @@ def get_leadership_schedule(
366366
unparsed = self.query_cli(
367367
[
368368
"leadership-schedule",
369+
"--output-text",
369370
"--genesis",
370371
str(self._clusterlib_obj.genesis_json),
371372
"--vrf-signing-key-file",

0 commit comments

Comments
 (0)