mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-09-10 01:44:19 +03:00
netlist: Fix UI error when virtual network doesn't exist
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
@@ -397,9 +397,12 @@ class vmmNetworkList(vmmGObjectUI):
|
|||||||
uiutil.set_grid_row_visible(
|
uiutil.set_grid_row_visible(
|
||||||
self.widget("net-manual-source"), show_bridge)
|
self.widget("net-manual-source"), show_bridge)
|
||||||
|
|
||||||
portgroups = []
|
net = None
|
||||||
if is_virtual:
|
if is_virtual:
|
||||||
net = self.conn.get_net_by_name(rowdata.source)
|
net = self.conn.get_net_by_name(rowdata.source)
|
||||||
|
|
||||||
|
portgroups = []
|
||||||
|
if net:
|
||||||
portgroups = net.get_xmlobj().portgroups
|
portgroups = net.get_xmlobj().portgroups
|
||||||
|
|
||||||
uiutil.set_grid_row_visible(
|
uiutil.set_grid_row_visible(
|
||||||
|
Reference in New Issue
Block a user