From 725677fc64a03a1a83a6888e1693202a3e93af41 Mon Sep 17 00:00:00 2001
From: Benjamin Blanc <benjamin.blanc@tiolive.com>
Date: Wed, 11 Sep 2013 11:24:16 +0200
Subject: [PATCH] erp5_test_result: ERP5ScalabilityDistributor: fix statement
 condition

---
 .../ERP5ScalabilityDistributor.py                     | 11 +++++------
 bt5/erp5_test_result/bt/revision                      |  2 +-
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/bt5/erp5_test_result/DocumentTemplateItem/ERP5ScalabilityDistributor.py b/bt5/erp5_test_result/DocumentTemplateItem/ERP5ScalabilityDistributor.py
index afd643eff3..80e99e2923 100644
--- a/bt5/erp5_test_result/DocumentTemplateItem/ERP5ScalabilityDistributor.py
+++ b/bt5/erp5_test_result/DocumentTemplateItem/ERP5ScalabilityDistributor.py
@@ -172,12 +172,11 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
     master_test_node_title_list = [x.getTitle() for x in test_node_module.searchFolder(
                 validatation_state = 'validated') if (x.getMaster() == True) ]
 
-    if len(master_test_node_title_list) > 0:
-      master_test_node_title = master_test_node_title_list[0]
-    
-      if title == master_test_node_title:
-        return super(ERP5ScalabilityDistributor,
-                        self).startTestSuite(title=title, batch_mode=batch_mode, computer_guid=computer_guid)
+    if len(master_test_node_title_list) == 1 and title == master_test_node_title_list[0]:
+      return super(ERP5ScalabilityDistributor,
+                   self).startTestSuite(title=title,
+                                        batch_mode=batch_mode,
+                                        computer_guid=computer_guid)     
     else:
       if batch_mode:
         return []
diff --git a/bt5/erp5_test_result/bt/revision b/bt5/erp5_test_result/bt/revision
index 8bc94cb760..6610e117a3 100644
--- a/bt5/erp5_test_result/bt/revision
+++ b/bt5/erp5_test_result/bt/revision
@@ -1 +1 @@
-276
\ No newline at end of file
+277
\ No newline at end of file
-- 
2.30.9