diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2019-12-03 17:14:22 +0000 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2019-12-04 12:08:21 +0000 |
commit | 4560013b6e0482f8dc219aca4d8cba647c51998e (patch) | |
tree | e5a02e384b80da87eae808d5d0f064cb27525a61 /scripts | |
parent | d57d8d6e922040a2cc4ee7c73eac5efca042ba88 (diff) | |
download | libvirt-4560013b6e0482f8dc219aca4d8cba647c51998e.tar.gz |
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-symsorting.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: |