Commit 3248a10d authored by Nicolas Dumazet's avatar Nicolas Dumazet

use key argument to sort instead of cmp


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37315 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f7ffbd2b
...@@ -208,7 +208,7 @@ class TradeCondition(Path, Transformation): ...@@ -208,7 +208,7 @@ class TradeCondition(Path, Transformation):
### If all items in final_list has int_index value, then sort it by ### If all items in final_list has int_index value, then sort it by
### int_index to solve undetermined order problem. ### int_index to solve undetermined order problem.
if len([item for item in final_list if not item.getIntIndex()])==0: 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 return final_list
......
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