mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 22:42:53 +00:00
misc: refine upgrade script
There is some issue when use upgrade to update some old xml version to release_3.1, this patch modify the upgrade script to fix these issue. Tracked-On: #6690 Signed-off-by: Chenli Wei <chenli.wei@intel.com>
This commit is contained in:
parent
73ffa7d6d2
commit
669ebd0fd7
@ -316,14 +316,15 @@ class VirtioDevices(object):
|
||||
interface_name = network.xpath("./interface_name")[0].text if network.xpath("./interface_name") else None
|
||||
self.networks.append((virtio_framework, interface_name))
|
||||
|
||||
if virtio_device_node.xpath("./input")[0].text is not None:
|
||||
for input in virtio_device_node.xpath("./input"):
|
||||
self.inputs.append((None, input.text))
|
||||
else:
|
||||
for input in virtio_device_node.xpath("./input"):
|
||||
backend_device_file = input.xpath("./backend_device_file")[0].text if input.xpath("./backend_device_file") else None
|
||||
id = input.xpath("./id")[0].text if input.xpath("./id") else None
|
||||
self.inputs.append((backend_device_file, id))
|
||||
if len(virtio_device_node.xpath("./input")) > 0:
|
||||
if virtio_device_node.xpath("./input")[0].text is not None:
|
||||
for input in virtio_device_node.xpath("./input"):
|
||||
self.inputs.append((None, input.text))
|
||||
else:
|
||||
for input in virtio_device_node.xpath("./input"):
|
||||
backend_device_file = input.xpath("./backend_device_file")[0].text if input.xpath("./backend_device_file") else None
|
||||
id = input.xpath("./id")[0].text if input.xpath("./id") else None
|
||||
self.inputs.append((backend_device_file, id))
|
||||
|
||||
for console in virtio_device_node.xpath("./console"):
|
||||
self.console_encoding(console)
|
||||
|
Loading…
Reference in New Issue
Block a user