From: Daniel P. Berrangé Date: Tue, 3 Dec 2019 17:14:22 +0000 (+0000) Subject: scripts: fix list indexing when printing mis-ordered symbols X-Git-Tag: v6.0.0-rc1~517 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4560013b6e0482f8dc219aca4d8cba647c51998e;p=thirdparty%2Flibvirt.git scripts: fix list indexing when printing mis-ordered symbols The python array slice syntax expects the first and last indexes, not the first length and element count. Reviewed-by: Michal Privoznik Signed-off-by: Daniel P. Berrangé --- diff --git a/scripts/check-symsorting.py b/scripts/check-symsorting.py index 8e698c0657..006c42f1b3 100755 --- a/scripts/check-symsorting.py +++ b/scripts/check-symsorting.py @@ -59,8 +59,8 @@ def check_sorting(group, symfile, line, groupfile, lastgroup): issorted = False if not issorted: - actual = group[first:(last - first + 1)] - expect = sortedgroup[first:(last - first + 1)] + actual = group[first:last] + expect = sortedgroup[first:last] print("Symbol block at %s:%s: symbols not sorted" % (symfile, line), file=sys.stderr) for g in actual: