More bad input handling
Change-Id: I3509892b187138b725d139a2975746e874cba5bb
diff --git a/TestON/tests/HAsanity/HAsanity.py b/TestON/tests/HAsanity/HAsanity.py
index 517d53e..5322a9a 100644
--- a/TestON/tests/HAsanity/HAsanity.py
+++ b/TestON/tests/HAsanity/HAsanity.py
@@ -2090,12 +2090,13 @@
hosts.append( None )
for controller in range( 0, len( hosts ) ):
controllerStr = str( controller + 1 )
- for host in hosts[ controller ]:
- if host is None or host.get( 'ipAddresses', [] ) == []:
- main.log.error(
- "Error with host ipAddresses on controller" +
- controllerStr + ": " + str( host ) )
- ipResult = main.FALSE
+ if hosts[ controller ]:
+ for host in hosts[ controller ]:
+ if host is None or host.get( 'ipAddresses', [] ) == []:
+ main.log.error(
+ "Error with host ipAddresses on controller" +
+ controllerStr + ": " + str( host ) )
+ ipResult = main.FALSE
ports = []
threads = []
for i in range( main.numCtrls ):