ip may be none in qemu pool
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 27 Nov 2008 10:26:36 +0000 (10:26 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 27 Nov 2008 10:26:36 +0000 (10:26 +0000)
system/TestPool.py

index 3f47340..b516ade 100644 (file)
@@ -35,7 +35,7 @@ class TestPool:
     # let's be flexible
     def locate_entry (self, hostname_or_ip, busy=True):
         for (h,i,u) in self.pool:
-            if h.find(hostname_or_ip)>=0  or i.find(hostname_or_ip)>=0 :
+            if h.find(hostname_or_ip)>=0  or (i and i.find(hostname_or_ip)>=0) :
                 if busy:
                     self.busy.append(h)
                 return (h,i,u)