arch: list.sort() sorting by key only in python3
[gem5.git] / src / arch / isa_parser.py
index 757c72c761f243396e51b7e5ba54f135e1825200..8eb90eff6a263dd8dd6bf9ea47f2ec67d9678135 100755 (executable)
@@ -1289,7 +1289,7 @@ class OperandList(object):
         return self.__internalConcatAttrs(attr_name, filter, [])
 
     def sort(self):
-        self.items.sort(lambda a, b: a.sort_pri - b.sort_pri)
+        self.items.sort(key=lambda a: a.sort_pri)
 
 class SubOperandList(OperandList):
     '''Find all the operands in the given code block.  Returns an operand