Fix bug, 'or' to 'and'
Change-Id: I120d3d34557f7342f1444568a2a0a3de1de6ef5f
diff --git a/TestON/tests/HAclusterRestart/HAclusterRestart.py b/TestON/tests/HAclusterRestart/HAclusterRestart.py
index 0c3ce16..ed8b2d2 100644
--- a/TestON/tests/HAclusterRestart/HAclusterRestart.py
+++ b/TestON/tests/HAclusterRestart/HAclusterRestart.py
@@ -1656,7 +1656,7 @@
onfail="ONOS" + controllerStr +
" links view is incorrect" )
- if hosts[ controller ] or "Error" not in hosts[ controller ]:
+ if hosts[ controller ] and "Error" not in hosts[ controller ]:
currentHostsResult = main.Mininet1.compareHosts(
mnHosts,
hosts[ controller ] )
@@ -2280,8 +2280,7 @@
" links view is correct",
onfail="ONOS" + controllerStr +
" links view is incorrect" )
-
- if hosts[ controller ] or "Error" not in hosts[ controller ]:
+ if hosts[ controller ] and "Error" not in hosts[ controller ]:
currentHostsResult = main.Mininet1.compareHosts(
mnHosts,
hosts[ controller ] )
@@ -2325,7 +2324,7 @@
elif i == 28:
deviceId = "2800".zfill(16)
mappings[ macId ] = deviceId
- if hosts[ controller ] or "Error" not in hosts[ controller ]:
+ if hosts[ controller ] and "Error" not in hosts[ controller ]:
if hosts[ controller ] == []:
main.log.warn( "There are no hosts discovered" )
noHosts = True
@@ -2399,7 +2398,7 @@
consistentHostsResult = main.TRUE
for controller in range( len( hosts ) ):
controllerStr = str( controller + 1 )
- if hosts[ controller ] or "Error" not in hosts[ controller ]:
+ if hosts[ controller ] and "Error" not in hosts[ controller ]:
if hosts[ controller ] == hosts[ 0 ]:
continue
else: # hosts not consistent