Fix bug, 'or' to 'and'
Change-Id: I120d3d34557f7342f1444568a2a0a3de1de6ef5f
diff --git a/TestON/tests/HAsanity/HAsanity.py b/TestON/tests/HAsanity/HAsanity.py
index 5322a9a..1a5bbfe 100644
--- a/TestON/tests/HAsanity/HAsanity.py
+++ b/TestON/tests/HAsanity/HAsanity.py
@@ -1637,7 +1637,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 ] )
@@ -2173,8 +2173,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 ] )
@@ -2218,7 +2217,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
@@ -2290,7 +2289,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