diff --git a/Lib/test/test_gdb/test_pretty_print.py b/Lib/test/test_gdb/test_pretty_print.py index dfc77d65ab16a40..b110db03b56a1f0 100644 --- a/Lib/test/test_gdb/test_pretty_print.py +++ b/Lib/test/test_gdb/test_pretty_print.py @@ -116,7 +116,7 @@ def test_strings(self): 'python import locale; print(locale.getpreferredencoding())') encoding = stdout - if stderr or not encoding: + if not encoding: raise RuntimeError( f'unable to determine the Python locale preferred encoding ' f'of embedded Python in GDB\n'