followup: code cleanup, remove unnecessary type check

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-04-11 09:11:07 +02:00
parent 035452b97f
commit 0bd2dc09e4

View File

@ -48,10 +48,7 @@ sub parse_section_header {
my $type = lc($1);
my $id = $2 // $type;
my $errmsg = undef; # set if you want to skip whole section
eval {
PVE::JSONSchema::pve_verify_configid($type);
PVE::JSONSchema::pve_verify_configid($id);
};
eval { PVE::JSONSchema::pve_verify_configid($id) };
$errmsg = $@ if $@;
my $config = {}; # to return additional attributes
return ($type, $id, $errmsg, $config);