Fix bug, 'or' to 'and'
Change-Id: I120d3d34557f7342f1444568a2a0a3de1de6ef5f
diff --git a/TestON/tests/HAstopNodes/HAstopNodes.py b/TestON/tests/HAstopNodes/HAstopNodes.py
index 84e7d9c..cb5032b 100644
--- a/TestON/tests/HAstopNodes/HAstopNodes.py
+++ b/TestON/tests/HAstopNodes/HAstopNodes.py
@@ -1670,7 +1670,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 ] )
@@ -2266,8 +2266,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 ] )
@@ -2311,7 +2310,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" )
zeroHosts = True
@@ -2382,7 +2381,7 @@
consistentHostsResult = main.TRUE
for controller in range( len( hosts ) ):
controllerStr = str( main.activeNodes[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