diff options
| author | Michael Woerister <michaelwoerister@posteo.net> | 2016-08-17 09:55:27 -0400 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo.net> | 2016-08-17 09:55:27 -0400 |
| commit | 6aca068abae964f4f072528b95404d1409175e83 (patch) | |
| tree | 854640421eb3104b127f482e2b96362eda5cfd31 | |
| parent | e25542cb02d946959517ebb68e2f7b1318817237 (diff) | |
| download | rust-6aca068abae964f4f072528b95404d1409175e83.tar.gz rust-6aca068abae964f4f072528b95404d1409175e83.zip | |
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`.
| -rwxr-xr-x | src/etc/gdb_rust_pretty_printing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py index 554ab66bc56..cc5f621cb6b 100755 --- a/src/etc/gdb_rust_pretty_printing.py +++ b/src/etc/gdb_rust_pretty_printing.py @@ -16,7 +16,7 @@ import debugger_pretty_printers_common as rustpp # 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 #=============================================================================== |
