[Erp5-report] r37315 nicolas.dumazet - /erp5/trunk/products/ERP5/Document/TradeCondition.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 28 11:42:48 CEST 2010


Author: nicolas.dumazet
Date: Wed Jul 28 11:42:48 2010
New Revision: 37315

URL: http://svn.erp5.org?rev=37315&view=rev
Log:
use key argument to sort instead of cmp

Modified:
    erp5/trunk/products/ERP5/Document/TradeCondition.py

Modified: erp5/trunk/products/ERP5/Document/TradeCondition.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TradeCondition.py?rev=37315&r1=37314&r2=37315&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeCondition.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeCondition.py [utf8] Wed Jul 28 11:42:48 2010
@@ -208,7 +208,7 @@ class TradeCondition(Path, Transformatio
       ### If all items in final_list has int_index value, then sort it by
       ### int_index to solve undetermined order problem.
       if len([item for item in final_list if not item.getIntIndex()])==0:
-        final_list.sort(lambda a, b:cmp(a.getIntIndex(), b.getIntIndex()))
+        final_list.sort(key=lambda a:a.getIntIndex())
 
       return final_list
 




More information about the Erp5-report mailing list