From 75d1eb55aeb4044edf524eea3b99a91b9408a56c Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 5 Jun 2023 13:27:01 +0200 Subject: [PATCH] cli: subscription: simplify printing output in get command Signed-off-by: Thomas Lamprecht --- PVE/CLI/pvesubscription.pm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/PVE/CLI/pvesubscription.pm b/PVE/CLI/pvesubscription.pm index a62d2be1..2eb26cb4 100755 --- a/PVE/CLI/pvesubscription.pm +++ b/PVE/CLI/pvesubscription.pm @@ -51,13 +51,10 @@ __PACKAGE__->register_method({ our $cmddef = { update => [ 'PVE::API2::Subscription', 'update', undef, { node => $nodename } ], - get => [ 'PVE::API2::Subscription', 'get', undef, { node => $nodename }, - sub { - my $info = shift; - foreach my $k (sort keys %$info) { - print "$k: $info->{$k}\n"; - } - }], + get => [ 'PVE::API2::Subscription', 'get', undef, { node => $nodename }, sub { + my $info = shift; + print "$_: $info->{$_}\n" for sort keys %$info; + }], set => [ 'PVE::API2::Subscription', 'set', ['key'], { node => $nodename } ], "set-offline-key" => [ __PACKAGE__, 'set_offline_key', ['data'] ], delete => [ 'PVE::API2::Subscription', 'delete', undef, { node => $nodename } ],