Commit 522311b1 authored by Tristan Cavelier's avatar Tristan Cavelier

[taskdistribution] apply some fixes

- Use unrestricted _edit method on reportTaskStatus - restrictedTraverse applies security anyway
- Remove some useless code
- Fix TypeError: stopUnitTest() takes exactly 3 arguments (4 given)
parent 8f136d4e
......@@ -441,9 +441,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
"""
LOG('ERP5ProjectUnitTestDistributor.stop_unit_test', 0, test_path)
portal = self.getPortalObject()
test_result = portal.unrestrictedTraverse(test_path)
test_suite_title = test_result.getTitle()
return portal.portal_task_distribution.stopUnitTest(self,test_path,status_dict)
return portal.portal_task_distribution.stopUnitTest(test_path, status_dict)
security.declarePublic("generateConfiguration")
def generateConfiguration(self, test_suite_title, batch_mode=0):
......
......@@ -294,7 +294,7 @@ class TaskDistributionTool(BaseTool):
test_result = portal.restrictedTraverse(test_result_path)
node = self._getTestResultNode(test_result, node_title)
assert node is not None
node.edit(cmdline=status_dict['command'],
node._edit(cmdline=status_dict['command'],
stdout=status_dict['stdout'], stderr=status_dict['stderr'])
security.declarePublic('isTaskAlive')
......
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