mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
connection: Only fetch interface object in tick when needed
We don't need to look up the interface object ahead of time, only do it if we appear to have a new interface.
This commit is contained in:
parent
22a2a4b57c
commit
d0873210a0
@ -897,10 +897,10 @@ class vmmConnection(gobject.GObject):
|
||||
logging.exception("Unable to list inactive interfaces")
|
||||
|
||||
def check_obj(name, is_active):
|
||||
obj = self.vmm.interfaceLookupByName(name)
|
||||
key = obj.name()
|
||||
key = name
|
||||
|
||||
if not orig.has_key(key):
|
||||
obj = self.vmm.interfaceLookupByName(name)
|
||||
# Object is brand new this tick period
|
||||
current[key] = vmmInterface(self.config, self, obj, key,
|
||||
is_active)
|
||||
|
Loading…
Reference in New Issue
Block a user