diff --git a/Lib/test/test_gdb/test_pretty_print.py b/Lib/test/test_gdb/test_pretty_print.py index a258d7c0e60c7e1..5fbf19b05dd5c6e 100644 --- a/Lib/test/test_gdb/test_pretty_print.py +++ b/Lib/test/test_gdb/test_pretty_print.py @@ -115,7 +115,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'