From 32589231de03393d731c89d10ab495107cd4adf5 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Mon, 7 Aug 2023 10:46:25 -0600 Subject: [PATCH] Add missing checks for ip not found scenarios Signed-off-by: Travis F. Collins --- nebula/manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nebula/manager.py b/nebula/manager.py index fb185406..100ecd1b 100644 --- a/nebula/manager.py +++ b/nebula/manager.py @@ -166,7 +166,7 @@ def copy_reference_from_sdcard(self, bootbinpath, uimagepath, devtreepath): def network_check(self): if not self.net.ping_board(): ip = self.monitor[0].get_ip_address() - if ip != self.net.dutip: + if ip and ip != self.net.dutip: log.info("DUT IP changed to: " + str(ip)) self.net.dutip = ip self.driver.uri = "ip:" + ip @@ -504,7 +504,10 @@ def board_reboot(self): self.monitor[0].load_system_uart() time.sleep(20) - log.info("IP Address: " + str(self.monitor[0].get_ip_address())) + ip = self.monitor[0].get_ip_address() + if not ip: + raise ne.LinuxNotFunctionalAfterBootFileUpdate + log.info("IP Address: " + str(ip)) self.net.check_board_booted() except Exception as ex: raise Exception("Getting board back failed", str(ex))