Commit 2a5db95c authored by Tom Niget's avatar Tom Niget

Fix deletion issue

parent 517bf1de
......@@ -555,8 +555,11 @@ def get_bridge(br):
iface = get_if(br)
brdata = _sysfs_read_br(iface.name)
# ports = [ifdata[1][x].index for x in brdata["ports"]]
del brdata["ports"]
return bridge.upgrade(iface, **brdata)
if brdata is not None:
del brdata["ports"]
return bridge.upgrade(iface, **brdata)
else:
return None
def create_bridge(br):
......@@ -598,6 +601,8 @@ def set_bridge(br, recover=True):
raise
orig_br = get_bridge(br)
if orig_br is None:
return
diff = br - orig_br # Only set what's needed
cmds = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment