[pve-devel] [PATCH container] use the proper pending delete format while looping
Oguz Bektas
o.bektas at proxmox.com
Tue Oct 22 12:40:41 CEST 2019
format of pending_delete_hash is changed in guest-common, so we have to
use the new format while looping over the hash.
Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
src/PVE/LXC/Config.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 916ecca..1bd3087 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -1166,7 +1166,7 @@ sub vmconfig_hotplug_pending {
my $pending_delete_hash = $class->parse_pending_delete($conf->{pending}->{delete});
# FIXME: $force deletion is not implemented for CTs
- while (my ($opt, undef) = each %$pending_delete_hash) {
+ foreach my $opt (keys %$pending_delete_hash) {
next if $selection && !$selection->{$opt};
eval {
if ($LXC_FASTPLUG_OPTIONS->{$opt}) {
@@ -1250,7 +1250,7 @@ sub vmconfig_apply_pending {
my $pending_delete_hash = $class->parse_pending_delete($conf->{pending}->{delete});
# FIXME: $force deletion is not implemented for CTs
- while (my ($opt, undef) = each %$pending_delete_hash) {
+ foreach my $opt (keys %$pending_delete_hash) {
next if $selection && !$selection->{$opt};
$class->cleanup_pending($conf);
eval {
--
2.20.1
More information about the pve-devel
mailing list