Skip to content

Commit

Permalink
only reload the interface details if the interface wasn't up the last…
Browse files Browse the repository at this point in the history
… time we did it
  • Loading branch information
WanWizard committed Jan 8, 2022
1 parent 3f38d0e commit 0d298ef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/python/Components/Network.py
Expand Up @@ -291,11 +291,9 @@ def getAdapterList(self):
return self.ifaces.keys()

def getAdapterAttribute(self, iface, attribute):
result = self.ifaces.get(iface, {}).get(attribute)
if not result:
if not self.ifaces[iface]['up']:
self.getAddrInet(iface, callback=None)
result = self.ifaces.get(iface, {}).get(attribute)
return result
return self.ifaces.get(iface, {}).get(attribute)

def setAdapterAttribute(self, iface, attribute, value):
print "setting for adapter", iface, "attribute", attribute, " to value", value
Expand Down

0 comments on commit 0d298ef

Please sign in to comment.