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

Fix deletion issue

parent 517bf1de
...@@ -555,8 +555,11 @@ def get_bridge(br): ...@@ -555,8 +555,11 @@ def get_bridge(br):
iface = get_if(br) iface = get_if(br)
brdata = _sysfs_read_br(iface.name) brdata = _sysfs_read_br(iface.name)
# ports = [ifdata[1][x].index for x in brdata["ports"]] # ports = [ifdata[1][x].index for x in brdata["ports"]]
if brdata is not None:
del brdata["ports"] del brdata["ports"]
return bridge.upgrade(iface, **brdata) return bridge.upgrade(iface, **brdata)
else:
return None
def create_bridge(br): def create_bridge(br):
...@@ -598,6 +601,8 @@ def set_bridge(br, recover=True): ...@@ -598,6 +601,8 @@ def set_bridge(br, recover=True):
raise raise
orig_br = get_bridge(br) orig_br = get_bridge(br)
if orig_br is None:
return
diff = br - orig_br # Only set what's needed diff = br - orig_br # Only set what's needed
cmds = [] 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