Skip invalid property's in storage parser

There is no need to remove the hole storage, if one property is not valid.
Just ignore the property.
This commit is contained in:
Wolfgang Link
2016-03-31 15:18:38 +02:00
committed by Dietmar Maurer
parent 83d7192ff9
commit 703de49ea9

View File

@ -235,7 +235,8 @@ sub decode_value {
foreach my $c (PVE::Tools::split_list($value)) { foreach my $c (PVE::Tools::split_list($value)) {
if (!$valid_content->{$c}) { if (!$valid_content->{$c}) {
die "storage does not support content type '$c'\n"; warn "storage does not support content type '$c'\n";
next;
} }
$res->{$c} = 1; $res->{$c} = 1;
} }
@ -249,7 +250,8 @@ sub decode_value {
my $valid_formats = $def->{format}->[0]; my $valid_formats = $def->{format}->[0];
if (!$valid_formats->{$value}) { if (!$valid_formats->{$value}) {
die "storage does not support format '$value'\n"; warn "storage does not support format '$value'\n";
next;
} }
return $value; return $value;