Subject: netlist: Fix UI error when virtual network doesn't exist From: Cole Robinson crobinso@redhat.com Sat Mar 2 11:10:41 2024 -0500 Date: Sat Mar 2 13:22:45 2024 -0500: Git: 7ae3e10bc40586c33c45d204ff828a95a9faec9c Signed-off-by: Cole Robinson diff --git a/virtManager/device/netlist.py b/virtManager/device/netlist.py index 5136bf8b..51400acf 100644 --- a/virtManager/device/netlist.py +++ b/virtManager/device/netlist.py @@ -397,9 +397,12 @@ class vmmNetworkList(vmmGObjectUI): uiutil.set_grid_row_visible( self.widget("net-manual-source"), show_bridge) - portgroups = [] + net = None if is_virtual: net = self.conn.get_net_by_name(rowdata.source) + + portgroups = [] + if net: portgroups = net.get_xmlobj().portgroups uiutil.set_grid_row_visible(