mirror of
https://github.com/retspen/webvirtcloud
synced 2024-10-31 19:44:16 +00:00
vrtManager/instance.py: get_media_device fix: media.xpath returns list
This commit is contained in:
parent
951498e841
commit
3b99c983d5
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue