Commit 6781c652 authored by Romain Courteaud's avatar Romain Courteaud

Remove a except used without exception name.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3779 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c70327ab
...@@ -627,15 +627,13 @@ class XMLMatrix(Folder): ...@@ -627,15 +627,13 @@ class XMLMatrix(Folder):
delCells = delMatrix delCells = delMatrix
security.declareProtected( Permissions.AccessContentsInformation, '_checkConsistency' ) security.declareProtected( Permissions.AccessContentsInformation, '_checkConsistency' )
def _checkConsistency(self, fixit = 0): def _checkConsistency(self, fixit=0):
# Check useless cells # Check useless cells
to_delete = [] to_delete = []
errors = [] errors = []
# We make sure first that there is an index # We make sure first that there is an index
if not hasattr(self, 'index'): if not hasattr(self, 'index'):
self.index = PersistentMapping() self.index = PersistentMapping()
# We will check each cell of the matrix the matrix # We will check each cell of the matrix the matrix
for object in self.objectValues(): for object in self.objectValues():
# obect.id is equal to something like 'something_quantity_3_2' # obect.id is equal to something like 'something_quantity_3_2'
...@@ -649,11 +647,12 @@ class XMLMatrix(Folder): ...@@ -649,11 +647,12 @@ class XMLMatrix(Folder):
is_int = 1 is_int = 1
test_num = None test_num = None
while base_id_len > 0: while base_id_len > 0:
try: # XXX it is bad to use except without exception name !
# try:
# if this succeeds, it is very likely a cell with an id such as quantity_X_Y_0_Z # if this succeeds, it is very likely a cell with an id such as quantity_X_Y_0_Z
test_num = int(object_id_split[base_id_len-1]) test_num = int(object_id_split[base_id_len-1])
except: # except:
is_int = 0 # is_int = 0
if not is_int: break if not is_int: break
base_id_len -= 1 base_id_len -= 1
if base_id_len > 0: if base_id_len > 0:
......
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