Commit 1e5f58a6 authored by Nicolas Dumazet's avatar Nicolas Dumazet

delete one level of indentation for clarity


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32817 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e1bfcdec
...@@ -658,30 +658,31 @@ class XMLMatrix(Folder): ...@@ -658,30 +658,31 @@ class XMLMatrix(Folder):
# The matrix does not have this base_id # The matrix does not have this base_id
addError("There is no index for base_id %s" % base_id) addError("There is no index for base_id %s" % base_id)
to_delete_set.add(object_id) to_delete_set.add(object_id)
else: continue
# Check empty indices.
empty_list = [] # Check empty indices.
base_item = self.index[base_id] empty_list = []
for key, value in base_item.iteritems(): base_item = self.index[base_id]
if value is None or len(value) == 0: for key, value in base_item.iteritems():
addError("There is no id for the %dth axis of base_id %s" % (key, base_id)) if value is None or len(value) == 0:
empty_list.append(key) addError("There is no id for the %dth axis of base_id %s" % (key, base_id))
if fixit: empty_list.append(key)
for i in empty_list: if fixit:
del base_item[key] for i in empty_list:
del base_item[key]
len_id = len(base_item)
current_dimension = len(cell_coordinate_list) len_id = len(base_item)
if current_dimension != len_id: current_dimension = len(cell_coordinate_list)
addError("Dimension of cell is %s but should be %s" % (current_dimension, if current_dimension != len_id:
len_id)) addError("Dimension of cell is %s but should be %s" % (current_dimension,
to_delete_set.add(object_id) len_id))
else : to_delete_set.add(object_id)
for i, coordinate in enumerate(cell_coordinate_list): else :
if coordinate >= len(base_item[i]): for i, coordinate in enumerate(cell_coordinate_list):
addError("Cell %s is out of bound" % object_id) if coordinate >= len(base_item[i]):
to_delete_set.add(object_id) addError("Cell %s is out of bound" % object_id)
break to_delete_set.add(object_id)
break
if fixit and len(to_delete_set) > 0: if fixit and len(to_delete_set) > 0:
self.manage_delObjects(list(to_delete_set)) self.manage_delObjects(list(to_delete_set))
......
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