From b37b2c2e93f7d7b17027b6e978e9074a6e158380 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Wed, 8 Dec 2010 17:13:48 +0000
Subject: [PATCH]  - simplify

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41234 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/Vifib/Tool/SlapTool.py | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/product/Vifib/Tool/SlapTool.py b/product/Vifib/Tool/SlapTool.py
index f4ee128795..8c80db263e 100644
--- a/product/Vifib/Tool/SlapTool.py
+++ b/product/Vifib/Tool/SlapTool.py
@@ -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):
-- 
2.30.9