Handling null router cases
This commit is contained in:
parent
4c62692936
commit
10bdd5aef2
|
@ -172,7 +172,10 @@ class Pinger:
|
||||||
and self.router_log[-2] == -1
|
and self.router_log[-2] == -1
|
||||||
and self.router_log[-3] == -1):
|
and self.router_log[-3] == -1):
|
||||||
|
|
||||||
self.router = self.get_default_gateway_linux()
|
new_router = self.get_default_gateway_linux()
|
||||||
|
# Only update router if it's not blank
|
||||||
|
if new_router != None:
|
||||||
|
self.router = new_router
|
||||||
print "Updated router target to "+str(self.router)
|
print "Updated router target to "+str(self.router)
|
||||||
self.routerLastUpdated = datetime.datetime.now()
|
self.routerLastUpdated = datetime.datetime.now()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user