From 9b26e093e93d82b042a3f4e03c7c4cc5d7a2467d Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Fri, 15 Apr 2011 15:34:24 -0400 Subject: [PATCH] create: Warn about PXE and 'no networking' --- src/virtManager/create.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/virtManager/create.py b/src/virtManager/create.py index f81adb07f..67702339d 100644 --- a/src/virtManager/create.py +++ b/src/virtManager/create.py @@ -974,7 +974,8 @@ class vmmCreate(vmmGObjectUI): ntype = row[0] key = row[6] - if ntype == virtinst.VirtualNetworkInterface.TYPE_USER: + if (ntype == None or + ntype == virtinst.VirtualNetworkInterface.TYPE_USER): show_pxe_warn = True elif ntype != virtinst.VirtualNetworkInterface.TYPE_VIRTUAL: show_pxe_warn = False @@ -982,7 +983,10 @@ class vmmCreate(vmmGObjectUI): obj = self.conn.get_net(key) show_pxe_warn = not obj.can_pxe() - self.set_net_warn(show_pxe_warn and pxe_install, + if not (show_pxe_warn and pxe_install): + return + + self.set_net_warn(True, _("Network selection does not support PXE"), False) def hv_changed(self, src):