bpo-40436: Fix code parsing gdb version (GH-19792)

test_gdb and test.pythoninfo now check gdb command exit code.
This commit is contained in:
Victor Stinner 2020-04-29 17:11:48 +02:00 committed by GitHub
parent 9a8c1315c3
commit ec9bea4a37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View file

@ -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