More bad input handling

Change-Id: I3509892b187138b725d139a2975746e874cba5bb
diff --git a/TestON/tests/HAstopNodes/HAstopNodes.py b/TestON/tests/HAstopNodes/HAstopNodes.py
index 84b714d..84e7d9c 100644
--- a/TestON/tests/HAstopNodes/HAstopNodes.py
+++ b/TestON/tests/HAstopNodes/HAstopNodes.py
@@ -2183,12 +2183,13 @@
                     hosts.append( None )
             for controller in range( 0, len( hosts ) ):
                 controllerStr = str( main.activeNodes[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 main.activeNodes: