Skip to content

Commit a097f30

Browse files
committed
Fix 500 on IDE Drives
1 parent 9b26311 commit a097f30

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

proxstar/vm.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ def disks(self):
261261
disk_size = val.split(',')
262262
for split in disk_size:
263263
if 'size' in split:
264-
disk_size = split.split('=')[1].rstrip('G')
264+
size = split.split('=')[1]
265+
if size[-1] == 'M':
266+
size = f'{int(size.rstrip("M")) / 1000}G'
267+
disk_size = size.rstrip('G')
265268
disks.append([key, disk_size])
266269
disks = sorted(disks, key=lambda x: x[0])
267270
return disks
@@ -280,11 +283,10 @@ def cdroms(self):
280283
@lazy_property
281284
def isos(self):
282285
isos = []
283-
for iso in filter(lambda interface: 'ide' in interface, self.config.keys()):
286+
for iso in filter(lambda interface: interface in self.cdroms, self.config.keys()):
284287
iso_info = self.config[iso]
285288
if iso_info:
286289
if 'cloudinit' in iso_info:
287-
isos.append((iso, 'Clountinit Drive'))
288290
continue
289291
if iso_info.split(',')[0] == 'none':
290292
isos.append((iso, 'None'))

0 commit comments

Comments
 (0)