diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py index 554ab66bc563d..cc5f621cb6be0 100755 --- a/src/etc/gdb_rust_pretty_printing.py +++ b/src/etc/gdb_rust_pretty_printing.py @@ -16,7 +16,7 @@ # We want a version of `range` which doesn't allocate an intermediate list, # specifically it should use a lazy iterator. In Python 2 this was `xrange`, but # if we're running with Python 3 then we need to use `range` instead. -if sys.version_info.major >= 3: +if sys.version_info[0] >= 3: xrange = range #===============================================================================