Commit 1742d9c8 authored by Nicolas Dumazet's avatar Nicolas Dumazet

avoid extra spaces in Error strings; add two linebreaks for readability


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32304 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 016c3d73
...@@ -279,15 +279,15 @@ class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount): ...@@ -279,15 +279,15 @@ class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount):
quantity_defined_by = mapped_value.getRelativeUrl() quantity_defined_by = mapped_value.getRelativeUrl()
if quantity in [None,'']: if quantity in [None,'']:
raise KeyError, \ raise KeyError, \
"No cell quantity matching on TransformedResource '%s' for \ "No cell quantity matching on TransformedResource '%s' for "\
current context" % ( self.getRelativeUrl() , ) "current context" % ( self.getRelativeUrl() , )
else: else:
quantity = self.getQuantity() quantity = self.getQuantity()
quantity_defined_by = self.getRelativeUrl() quantity_defined_by = self.getRelativeUrl()
if quantity in [None,'']: if quantity in [None,'']:
raise KeyError, \ raise KeyError, \
"No quantity defined on TransformedResource '%s' for \ "No quantity defined on TransformedResource '%s' for "\
current context" % (self.getRelativeUrl(), ) "current context" % (self.getRelativeUrl(), )
# If we have to do this, then there is a problem.... # If we have to do this, then there is a problem....
# We'd better have better API for this, # We'd better have better API for this,
# like an update function in the mapped_value # like an update function in the mapped_value
...@@ -295,6 +295,8 @@ class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount): ...@@ -295,6 +295,8 @@ class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount):
quantity = float(quantity) quantity = float(quantity)
except ValueError: except ValueError:
error_string += 'Quantity is not a float.' error_string += 'Quantity is not a float.'
# Get the variation category list # Get the variation category list
variation_category_list_defined_by = None variation_category_list_defined_by = None
variation_category_list = None variation_category_list = None
...@@ -319,8 +321,8 @@ class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount): ...@@ -319,8 +321,8 @@ class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount):
return aggregated_amount_list return aggregated_amount_list
else: else:
raise KeyError, \ raise KeyError, \
"No cell variation matching on TransformedResource '%s' \ "No cell variation matching on TransformedResource '%s' "\
for current context" % (self.getRelativeUrl(), ) "for current context" % (self.getRelativeUrl(), )
else: else:
variation_category_list = self._getVariationCategoryList() variation_category_list = self._getVariationCategoryList()
variation_category_list_defined_by = self.getRelativeUrl() variation_category_list_defined_by = self.getRelativeUrl()
......
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