summaryrefslogtreecommitdiffstats
path: root/Lib/test/pythoninfo.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-04-29 15:30:01 (GMT)
committerGitHub <noreply@github.com>2020-04-29 15:30:01 (GMT)
commitd9e904919197a22b95946f11ba5f24b796088c06 (patch)
tree50b03dc83938febc9e0ed0b1471b92dd6c424227 /Lib/test/pythoninfo.py
parentcc011b5190b63f0be561ddec38fc4cd9e60cbf6a (diff)
downloadcpython-d9e904919197a22b95946f11ba5f24b796088c06.zip
cpython-d9e904919197a22b95946f11ba5f24b796088c06.tar.gz
cpython-d9e904919197a22b95946f11ba5f24b796088c06.tar.bz2
bpo-40436: Fix code parsing gdb version (GH-19792)
test_gdb and test.pythoninfo now check gdb command exit code. (cherry picked from commit ec9bea4a3766bd815148a27f61eb24e7dd459ac7) Co-authored-by: Victor Stinner <vstinner@python.org>
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 797b3af..9f3e79f 100644
--- a/Lib/test/pythoninfo.py
+++ b/Lib/test/pythoninfo.py
@@ -371,6 +371,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