From 025e1d900b0bbfed755877abe522d08877bfe600 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 27 Feb 2015 12:56:38 +0100 Subject: [PATCH] correct use hash with keys --- PVE/API2/Qemu.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index def4e5cf..8238c9c1 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -687,7 +687,7 @@ __PACKAGE__->register_method({ delete $conf->{snapshots}; if (!$param->{current}) { - foreach my $opt (keys $conf->{pending}) { + foreach my $opt (keys %{$conf->{pending}}) { next if $opt eq 'delete'; my $value = $conf->{pending}->{$opt}; next if ref($value); # just to be sure @@ -758,7 +758,7 @@ __PACKAGE__->register_method({ my $res = []; - foreach my $opt (keys $conf) { + foreach my $opt (keys %$conf) { next if ref($conf->{$opt}); my $item = { key => $opt }; $item->{value} = $conf->{$opt} if defined($conf->{$opt}); @@ -767,7 +767,7 @@ __PACKAGE__->register_method({ push @$res, $item; } - foreach my $opt (keys $conf->{pending}) { + foreach my $opt (keys %{$conf->{pending}}) { next if $opt eq 'delete'; next if ref($conf->{pending}->{$opt}); # just to be sure next if defined($conf->{$opt});