[Erp5-report] r41234 luke - /erp5/trunk/products/Vifib/Tool/SlapTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Dec 8 18:13:48 CET 2010
Author: luke
Date: Wed Dec 8 18:13:48 2010
New Revision: 41234
URL: http://svn.erp5.org?rev=41234&view=rev
Log:
- simplify
Modified:
erp5/trunk/products/Vifib/Tool/SlapTool.py
Modified: erp5/trunk/products/Vifib/Tool/SlapTool.py
URL: http://svn.erp5.org/erp5/trunk/products/Vifib/Tool/SlapTool.py?rev=41234&r1=41233&r2=41234&view=diff
==============================================================================
--- erp5/trunk/products/Vifib/Tool/SlapTool.py [utf8] (original)
+++ erp5/trunk/products/Vifib/Tool/SlapTool.py [utf8] Wed Dec 8 18:13:48 2010
@@ -232,14 +232,9 @@ class SlapTool(BaseTool):
"Load the given xml as configuration for the computer object"
self._loginAsSuperUser()
computer_dict = xml_marshaller.xml_marshaller.loads(xml)
- try:
- computer = self._getComputerDocument(computer_dict['reference'])
- except Unauthorized:
- return 'Bad reference'
-
- if computer.Computer_loadComputerPartitionsFromDictionnary(computer_dict):
- return 'Configuration properly registered'
- return 'Problem occured during the configuration registration'
+ computer = self._getComputerDocument(computer_dict['reference'])
+ computer.Computer_loadComputerPartitionsFromDictionnary(computer_dict)
+ return 'Content properly posted.'
security.declarePublic('useComputerPartition')
def useComputerPartition(self, computer_id, computer_partition_id, use_string):
More information about the Erp5-report
mailing list