summaryrefslogtreecommitdiffstats
path: root/Lib/test/pythoninfo.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-29 15:11:48 (GMT)
committerGitHub <noreply@github.com>2020-04-29 15:11:48 (GMT)
commitec9bea4a3766bd815148a27f61eb24e7dd459ac7 (patch)
tree808f462e186e6c7ff286186bac813af8488325c7 /Lib/test/pythoninfo.py
parent9a8c1315c3041fdb85d091bb8dc92f0d9dcb1529 (diff)
downloadcpython-ec9bea4a3766bd815148a27f61eb24e7dd459ac7.zip
cpython-ec9bea4a3766bd815148a27f61eb24e7dd459ac7.tar.gz
cpython-ec9bea4a3766bd815148a27f61eb24e7dd459ac7.tar.bz2
bpo-40436: Fix code parsing gdb version (GH-19792)
test_gdb and test.pythoninfo now check gdb command exit code.
Diffstat (limited to 'Lib/test/pythoninfo.py')
-rw-r--r--Lib/test/pythoninfo.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py
index cc230dd..cc0bbc5 100644
--- a/Lib/test/pythoninfo.py
+++ b/Lib/test/pythoninfo.py
@@ -376,6 +376,9 @@ def collect_gdb(info_add):
stderr=subprocess.PIPE,
universal_newlines=True)
version = proc.communicate()[0]
+ if proc.returncode:
+ # ignore gdb failure: test_gdb will log the error
+ return
except OSError:
return