[Erp5-report] r43779 luke - /erp5/trunk/products/Vifib/Tool/SlapTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Feb 25 17:35:20 CET 2011
Author: luke
Date: Fri Feb 25 17:35:20 2011
New Revision: 43779
URL: http://svn.erp5.org?rev=43779&view=rev
Log:
- allow to pass empty parameters and do not die in such momemnt,
fallback to reasonable defaults
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=43779&r1=43778&r2=43779&view=diff
==============================================================================
--- erp5/trunk/products/Vifib/Tool/SlapTool.py [utf8] (original)
+++ erp5/trunk/products/Vifib/Tool/SlapTool.py [utf8] Fri Feb 25 17:35:20 2011
@@ -556,10 +556,20 @@ class SlapTool(BaseTool):
In any other case returns not important data and HTTP code is 403 Forbidden
"""
- shared = xml_marshaller.xml_marshaller.loads(shared_xml)
- partition_parameter_kw = xml_marshaller.xml_marshaller.loads(
+ if shared_xml:
+ shared = xml_marshaller.xml_marshaller.loads(shared_xml)
+ else:
+ shared = False
+ if partition_parameter_xml:
+ partition_parameter_kw = xml_marshaller.xml_marshaller.loads(
partition_parameter_xml)
- filter_kw = xml_marshaller.xml_marshaller.loads(filter_xml)
+ else:
+ partition_parameter_kw = dict()
+ if filter_xml:
+ filter_kw = xml_marshaller.xml_marshaller.loads(filter_xml)
+ else:
+ filter_kw = dict()
+
instance = etree.Element('instance')
for parameter_id, parameter_value in partition_parameter_kw.iteritems():
# cast everything to string
More information about the Erp5-report
mailing list