Skip to content

Commit

Permalink
Merge pull request #99 from sdgtt/tfcollins/ip-check
Browse files Browse the repository at this point in the history
Add missing checks for ip not found scenarios
  • Loading branch information
tagoylo authored Aug 8, 2023
2 parents 6286b20 + 3258923 commit 30f79ee
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 30f79ee

Please sign in to comment.