Skip to content

Commit 89e8c5d

Browse files
committed
BaseVM: fix .vdi_uuids() when VM has no disks
b84ee9f fixed the case where a VM had more than 1 disk, but broke the case where it has *less* than 1. Signed-off-by: Yann Dirson <[email protected]>
1 parent 3052845 commit 89e8c5d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/basevm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ def name(self):
4040

4141
def vdi_uuids(self, sr_uuid=None):
4242
output = self._disk_list()
43+
if output == '':
44+
return []
45+
4346
all_uuids = output.split(',') # Split based on commas
4447
# Select only every alternate UUID (even index positions)
4548
vdis = all_uuids[0::2] # Start at 0, step by 2

0 commit comments

Comments
 (0)