diff options
| author | Bloh09 <104168236+Bloh09@users.noreply.github.com> | 2026-11-28 15:32:39 -0800 |
|---|---|---|
| committer | Bloh09 <104168236+Bloh09@users.noreply.github.com> | 2026-11-28 17:31:05 -0800 |
| commit | ff5ef7fa4909416ce74db6d202e919f99cc1bbef (patch) | |
| tree | 91212a7e5cd09185ee84c41dce413066872d84e1 /scripts | |
| parent | 6a1ccf0a95ff8a2c7b4c7431938d351c7784845f (diff) | |
tools, scripts: four programs guard stdout with errors=replace (CI-STDOUT-GUARD-NEW-TOOLS)
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/bench_translate.py | 4 | ||||
| -rw-r--r-- | scripts/export_old_pr_manifest.py | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/scripts/bench_translate.py b/scripts/bench_translate.py index b639098b9..f6000a82c 100644 --- a/scripts/bench_translate.py +++ b/scripts/bench_translate.py | |||
| @@ -306,4 +306,8 @@ def main(argv=None): | |||
| 306 | 306 | ||
| 307 | 307 | ||
| 308 | if __name__ == "__main__": | 308 | if __name__ == "__main__": |
| 309 | try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode | ||
| 310 | sys.stdout.reconfigure(errors="replace") | ||
| 311 | except (AttributeError, ValueError, OSError): | ||
| 312 | pass | ||
| 309 | sys.exit(main()) | 313 | sys.exit(main()) |
diff --git a/scripts/export_old_pr_manifest.py b/scripts/export_old_pr_manifest.py index 66d99f1ac..a83b12822 100644 --- a/scripts/export_old_pr_manifest.py +++ b/scripts/export_old_pr_manifest.py | |||
| @@ -120,4 +120,8 @@ def main(argv=None) -> int: | |||
| 120 | 120 | ||
| 121 | 121 | ||
| 122 | if __name__ == "__main__": | 122 | if __name__ == "__main__": |
| 123 | try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode | ||
| 124 | sys.stdout.reconfigure(errors="replace") | ||
| 125 | except (AttributeError, ValueError, OSError): | ||
| 126 | pass | ||
| 123 | sys.exit(main()) | 127 | sys.exit(main()) |