diff --git a/Lib/test/test_gdb/test_pretty_print.py b/Lib/test/test_gdb/test_pretty_print.py index 563379c63b68902..41043d77bd4b149 100644 --- a/Lib/test/test_gdb/test_pretty_print.py +++ b/Lib/test/test_gdb/test_pretty_print.py @@ -118,7 +118,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'