1
0
Fork 0
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:
Ing. Jan KRCMAR 2018-08-02 10:47:13 +02:00
parent 951498e841
commit 3b99c983d5

View file

@ -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()