From 099e6586706ecac8a1d1a7829f96d418d1206926 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 26 Mar 2019 10:13:09 +1300 Subject: [PATCH] make applying changes less jarring for virtual devices --- subiquitycore/ui/views/network.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subiquitycore/ui/views/network.py b/subiquitycore/ui/views/network.py index 13a52758..a4945336 100644 --- a/subiquitycore/ui/views/network.py +++ b/subiquitycore/ui/views/network.py @@ -292,6 +292,10 @@ class NetworkView(BaseView): log.debug( "del_link %s %s %s", dev.name, dev.ifindex, (dev in self.cur_netdevs)) + # If a virtual device disappears while we still have config + # for it, we assume it will be back soon. + if dev.is_virtual and dev.config is not None: + return if dev in self.cur_netdevs: netdev_i = self.cur_netdevs.index(dev) self._remove_row(netdev_i+1)