Fix pingall logging in mininet CLI driver
Change-Id: I4077089a013108ecff58a528fad674eb16862355
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index 8e1108b..7f9ac0e 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -477,9 +477,8 @@
# One of the host to host pair is unreachable
isReachable = main.FALSE
failedPings += 1
+ main.log.warn( "Cannot ping between {} and {}".format( host, temp ) )
pingResponse += "\n"
- if not isReachable:
- main.log.warn( "Cannot ping between {} and {}".format( host, temp ) )
main.log.info( pingResponse + "Failed pings: " + str( failedPings ) )
return isReachable
except pexpect.TIMEOUT:
@@ -545,9 +544,8 @@
pingResponse += " X"
isReachable = main.FALSE
failedPingsTotal += 1
+ main.log.warn( "Cannot ping between {} and {}".format( host, temp ) )
pingResponse += "\n"
- if not isReachable:
- main.log.warn( "Cannot ping between {} and {}".format( host, temp ) )
main.log.info( pingResponse + "Failed pings: " + str( failedPingsTotal ) )
return isReachable