mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
dhclient: check for out variable being None
Fixes: 765075ba392 ("dhclient: wait to start dhcp if carrier is down")
Signed-off-by: Andy Roulin <aroulin@nvidia.com>
This commit is contained in:
committed by
Julien Fortin
parent
1eacb76b3a
commit
f12bef8ba9
@@ -73,6 +73,8 @@ class dhclient(utilsBase):
|
|||||||
while '1' not in out and retries < 5:
|
while '1' not in out and retries < 5:
|
||||||
path = 'sys/class/net/%s/carrier' %ifacename
|
path = 'sys/class/net/%s/carrier' %ifacename
|
||||||
out = self.read_file_oneline(path)
|
out = self.read_file_oneline(path)
|
||||||
|
if out is None:
|
||||||
|
break # No sysfs file found for this iface
|
||||||
retries += 1
|
retries += 1
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user