Skip to content

Commit 358665a

Browse files
authored
Merge pull request #272 from rushikeshjadhav/issue-271
fix(lib/basevm): Correct VDI UUID(s) extraction
2 parents b6a21c3 + b84ee9f commit 358665a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/basevm.py

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

4141
def vdi_uuids(self, sr_uuid=None):
4242
output = self._disk_list()
43-
vdis = []
44-
for line in output.splitlines():
45-
vdis.append(line.split(',')[0])
43+
all_uuids = output.split(',') # Split based on commas
44+
# Select only every alternate UUID (even index positions)
45+
vdis = all_uuids[0::2] # Start at 0, step by 2
4646

4747
if sr_uuid is None:
4848
return vdis

0 commit comments

Comments
 (0)