ACK
On Wed, 2011-10-05 at 10:36 -0400, Russell Bryant wrote:
This addresses the failure seen in the last autobuild run.
Signed-off-by: Russell Bryant <rbryant(a)redhat.com>
---
src/tests/matahariTest.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/tests/matahariTest.py b/src/tests/matahariTest.py
index 4396703..1a342ba 100644
--- a/src/tests/matahariTest.py
+++ b/src/tests/matahariTest.py
@@ -54,7 +54,9 @@ def findAgent(session,agentKeyWord,agentClass,hostname):
for agent in agents:
if agentKeyWord in str(agent):
if agent.getAttributes().get('hostname') == hostname:
- return
agent.query("{class:"+agentClass+",package:'org.matahariproject'}")[0]
+ objs =
agent.query("{class:"+agentClass+",package:'org.matahariproject'}")
+ if objs and len(objs):
+ return objs[0]
time.sleep(1)
loop_count = loop_count + 1
sys.exit("specific " + agentKeyWord + " agent for " + hostname +
" not found.")