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 <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2019-12-03 17:14:22 +00:00
parent d57d8d6e92
commit 4560013b6e

View File

@ -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: