diff --git a/Lib/test/test_gdb/test_pretty_print.py b/Lib/test/test_gdb/test_pretty_print.py index ea047a12b802e88..04e06a64aaa5bb7 100644 --- a/Lib/test/test_gdb/test_pretty_print.py +++ b/Lib/test/test_gdb/test_pretty_print.py @@ -125,7 +125,7 @@ def test_strings(self): 'python import gdb; print(gdb.host_charset())') encoding = stdout.strip() - if stderr or not encoding: + if not encoding: raise RuntimeError( f'unable to determine the host charset of gdb\n' f'stdout={stdout!r}\n'