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