Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 3e7c849

Browse files
committed
PXEInstaller: Fix a TODO item
1 parent 8ddb430 commit 3e7c849

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

virtinst/PXEInstaller.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,11 @@ def prepare(self, guest, meter, distro = None):
2727
pass
2828

2929
def get_install_xml(self, guest, isinstall):
30-
if isinstall:
31-
bootdev = "network"
32-
else:
33-
# TODO: This can be smarter, take into account different
34-
# disk types, media availability, etc. Probably relevant
35-
# for other installers as well.
36-
if len(guest.disks) == 0:
37-
bootdev = "network"
38-
else:
39-
bootdev = "hd"
30+
bootdev = "network"
31+
if (not isinstall and
32+
filter(lambda d: d.device == d.DEVICE_DISK, guest.disks)):
33+
# If doing post-install boot and guest has an HD attached
34+
bootdev = "hd"
4035

4136
return self._get_osblob_helper(isinstall=isinstall, guest=guest,
4237
kernel=None, bootdev=bootdev)

0 commit comments

Comments
 (0)