Commit b37b2c2e authored by Łukasz Nowak's avatar Łukasz Nowak

- simplify


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41234 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f7e527fe
...@@ -232,14 +232,9 @@ class SlapTool(BaseTool): ...@@ -232,14 +232,9 @@ class SlapTool(BaseTool):
"Load the given xml as configuration for the computer object" "Load the given xml as configuration for the computer object"
self._loginAsSuperUser() self._loginAsSuperUser()
computer_dict = xml_marshaller.xml_marshaller.loads(xml) computer_dict = xml_marshaller.xml_marshaller.loads(xml)
try: computer = self._getComputerDocument(computer_dict['reference'])
computer = self._getComputerDocument(computer_dict['reference']) computer.Computer_loadComputerPartitionsFromDictionnary(computer_dict)
except Unauthorized: return 'Content properly posted.'
return 'Bad reference'
if computer.Computer_loadComputerPartitionsFromDictionnary(computer_dict):
return 'Configuration properly registered'
return 'Problem occured during the configuration registration'
security.declarePublic('useComputerPartition') security.declarePublic('useComputerPartition')
def useComputerPartition(self, computer_id, computer_partition_id, use_string): def useComputerPartition(self, computer_id, computer_partition_id, use_string):
......
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