Skip to content

Commit

Permalink
Auto merge of #35748 - michaelwoerister:fix-rust-gdb-py-version-check…
Browse files Browse the repository at this point in the history
…, 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
  • Loading branch information
bors committed Aug 24, 2016
2 parents a66fa96 + 6aca068 commit 308824a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/etc/gdb_rust_pretty_printing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

#===============================================================================
Expand Down

0 comments on commit 308824a

Please sign in to comment.