Commit 4ce90f33 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor: fixed for Bionic

parent 1f9cab94
......@@ -2881,6 +2881,10 @@ sub _change_hardware_cpu($self, $index, $data) {
$vcpu->appendText($data->{vcpu}->{_text});
}
my ($cpu) = $doc->findnodes('/domain/cpu');
if (!$cpu) {
my ($domain) = $doc->findnodes('/domain');
$cpu = $domain->addNewChild(undef,'cpu');
}
my $feature = delete $data->{cpu}->{feature};
for my $field (keys %{$data->{cpu}}) {
......
......@@ -174,7 +174,7 @@ sub _sort_xml_list($list, $field) {
}
sub _xml_elements($xml, $item) {
confess if !defined $xml;
return {} if !defined $xml;
my $text = $xml->textContent;
$item->{_text} = $text if $text && $text !~ /\n/m;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment