[Erp5-report] r32749 nicolas.dumazet - /erp5/trunk/products/ERP5Type/XMLMatrix.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Feb 18 11:27:24 CET 2010


Author: nicolas.dumazet
Date: Thu Feb 18 11:27:23 2010
New Revision: 32749

URL: http://svn.erp5.org?rev=32749&view=rev
Log:
simplify control flow

Modified:
    erp5/trunk/products/ERP5Type/XMLMatrix.py

Modified: erp5/trunk/products/ERP5Type/XMLMatrix.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/XMLMatrix.py?rev=32749&r1=32748&r2=32749&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Thu Feb 18 11:27:23 2010
@@ -656,15 +656,13 @@
         object_id_split = object_id.split('_')
         # We try to find the first split id which is an int
         base_id_len = len(object_id_split)
-        is_int = 1
         test_num = None
         while base_id_len > 0:
           try:
             # 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])
           except ValueError:
-            is_int = 0
-          if not is_int: break
+            break
           base_id_len -= 1
         if base_id_len > 0:
           base_id = '_'.join(object_id_split[0:base_id_len])




More information about the Erp5-report mailing list