From 468b343837b3d9e1d638a09d80125371c0836013 Mon Sep 17 00:00:00 2001 From: Dimitrios Chasapis Date: Thu, 10 Sep 2020 13:53:35 +0200 Subject: [PATCH] configs,python: Fixes an issue with python3 and the config scripts when restoring a checkpoint Fixes a compatibility issue with the configuration scripts when trying to restore a checkpoint. Since python2.4 list.sort has an updated interface. The older one has been dropped in python3. Jira Issue: https://gem5.atlassian.net/browse/GEM5-754 Change-Id: I09f819057d510e477d6ceae0356fafad40f4280d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34295 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- configs/common/Simulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py index e7fb8789e..a8d3771cc 100644 --- a/configs/common/Simulation.py +++ b/configs/common/Simulation.py @@ -196,7 +196,7 @@ def findCptDir(options, cptdir, testsys): if match: cpts.append(match.group(1)) - cpts.sort(lambda a,b: cmp(long(a), long(b))) + cpts.sort(key = lambda a: long(a)) cpt_num = options.checkpoint_restore if cpt_num > len(cpts): -- 2.30.2