mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +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]
|
device = media.xpath('@device')[0]
|
||||||
if device == 'cdrom':
|
if device == 'cdrom':
|
||||||
try:
|
try:
|
||||||
dev = media.xpath('target/@dev')
|
dev = media.xpath('target/@dev')[0]
|
||||||
try:
|
try:
|
||||||
src_fl = media.xpath('source/@file')
|
src_fl = media.xpath('source/@file')[0]
|
||||||
vol = self.get_volume_by_path(src_fl)
|
vol = self.get_volume_by_path(src_fl)
|
||||||
volume = vol.name()
|
volume = vol.name()
|
||||||
stg = vol.storagePoolLookupByVolume()
|
stg = vol.storagePoolLookupByVolume()
|
||||||
|
|
Loading…
Reference in a new issue