Skip to content

Commit 308824a

Browse files
authored
Auto merge of #35748 - michaelwoerister:fix-rust-gdb-py-version-check, r=brson
Make version check in gdb_rust_pretty_printing.py more compatible. Some versions of Python don't support the `major` field on the object returned by `sys.version_info`. Fixes #35724 r? @brson
2 parents a66fa96 + 6aca068 commit 308824a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/etc/gdb_rust_pretty_printing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# We want a version of `range` which doesn't allocate an intermediate list,
1717
# specifically it should use a lazy iterator. In Python 2 this was `xrange`, but
1818
# if we're running with Python 3 then we need to use `range` instead.
19-
if sys.version_info.major >= 3:
19+
if sys.version_info[0] >= 3:
2020
xrange = range
2121

2222
#===============================================================================

0 commit comments

Comments
 (0)