Skip to content

Commit

Permalink
Add missing checks for ip not found scenarios
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Aug 7, 2023
1 parent 6286b20 commit 3258923
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nebula/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 3258923

Please sign in to comment.