api: services: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-06-21 16:25:27 +02:00
parent 6b3e760581
commit 5fa0c20483

View File

@ -72,8 +72,7 @@ sub get_service_list {
my $list = {};
foreach my $name (@$service_name_list) {
my $ss;
eval { $ss = &$get_full_service_state($name); };
my $ss = eval { $get_full_service_state->($name) };
warn $@ if $@;
next if !$ss;
next if !defined($ss->{Description});