diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 09:23:38 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 09:23:38 -0500 |
| commit | 071ec8449caf234f3255cdc083afd9db2eda399b (patch) | |
| tree | 069c877a01da51f6eddc74f060bd6e5e060752da /scripts/run_address_guard_gpu_test.py | |
| parent | 96d8ce0802f5074173acd89cd0bb68325e5aaa7d (diff) | |
address guard: the two programs set errors='replace' on stdout
tests/test_tool_stdout_encoding.py requires it of every program's __main__ block.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/run_address_guard_gpu_test.py')
| -rw-r--r-- | scripts/run_address_guard_gpu_test.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/run_address_guard_gpu_test.py b/scripts/run_address_guard_gpu_test.py index ea42bdfae..f7aa53366 100644 --- a/scripts/run_address_guard_gpu_test.py +++ b/scripts/run_address_guard_gpu_test.py | |||
| @@ -126,4 +126,8 @@ def main(argv=None): | |||
| 126 | 126 | ||
| 127 | 127 | ||
| 128 | if __name__ == "__main__": | 128 | if __name__ == "__main__": |
| 129 | try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode | ||
| 130 | sys.stdout.reconfigure(errors="replace") | ||
| 131 | except (AttributeError, ValueError, OSError): | ||
| 132 | pass | ||
| 129 | sys.exit(main()) | 133 | sys.exit(main()) |