mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-26 15:13:33 +00:00
vrtManager/instance.py: get_media_device fix: media.xpath returns list
This commit is contained in:
@@ -274,9 +274,9 @@ class wvmInstance(wvmConnect):
|
||||
device = media.xpath('@device')[0]
|
||||
if device == 'cdrom':
|
||||
try:
|
||||
dev = media.xpath('target/@dev')
|
||||
dev = media.xpath('target/@dev')[0]
|
||||
try:
|
||||
src_fl = media.xpath('source/@file')
|
||||
src_fl = media.xpath('source/@file')[0]
|
||||
vol = self.get_volume_by_path(src_fl)
|
||||
volume = vol.name()
|
||||
stg = vol.storagePoolLookupByVolume()
|
||||
|
||||
Reference in New Issue
Block a user