Commit 6ed38256 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix pyflakes errors and warnings.

parent a85acf0c
...@@ -26,18 +26,11 @@ ...@@ -26,18 +26,11 @@
############################################################################## ##############################################################################
from Products.ERP5.Document.ERP5ProjectUnitTestDistributor import ERP5ProjectUnitTestDistributor from Products.ERP5.Document.ERP5ProjectUnitTestDistributor import ERP5ProjectUnitTestDistributor
import string from zLOG import LOG,ERROR
import erp5.util.taskdistribution
from Products.ERP5Type.Log import log
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
import json import json
import random
from Products.ERP5.Tool.TaskDistributionTool import TaskDistributionTool
class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor): class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
security = ClassSecurityInfo() security = ClassSecurityInfo()
...@@ -50,7 +43,6 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor): ...@@ -50,7 +43,6 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
""" """
# Get modules # Get modules
portal = self.getPortalObject()
test_node_module = self._getTestNodeModule() test_node_module = self._getTestNodeModule()
test_suite_module = self._getTestSuiteModule() test_suite_module = self._getTestSuiteModule()
...@@ -126,7 +118,7 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor): ...@@ -126,7 +118,7 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
if test_node.getValidationState() != 'validated': if test_node.getValidationState() != 'validated':
try: try:
test_node.validate() test_node.validate()
except e: except Exception, e:
LOG('Test Node Validate',ERROR,'%s' %e) LOG('Test Node Validate',ERROR,'%s' %e)
return test_node return test_node
return None return None
...@@ -159,13 +151,9 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor): ...@@ -159,13 +151,9 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
""" """
startTestSuite : subscribe node + return testsuite list to the master startTestSuite : subscribe node + return testsuite list to the master
""" """
config_list = []
super(ERP5ScalabilityDistributor, super(ERP5ScalabilityDistributor,
self).subscribeNode(title=title, computer_guid=computer_guid, batch_mode=batch_mode) self).subscribeNode(title=title, computer_guid=computer_guid, batch_mode=batch_mode)
test_node = self.getTestNode(title,batch_mode)
test_suite_module = self._getTestSuiteModule()
test_node_module = self._getTestNodeModule() test_node_module = self._getTestNodeModule()
portal = self.getPortalObject()
# If the testnode wich request testsuites is not the master # If the testnode wich request testsuites is not the master
# he does not have to receive any testsuites # he does not have to receive any testsuites
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment