GH-110786: suppress BrokenPipeError on the sysconfig CLI (#110791)

This commit is contained in:
Filipe Laíns 2023-10-13 06:49:55 +01:00 committed by GitHub
parent b883cad06b
commit 6478dea3c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -242,4 +242,7 @@ def _main():
if __name__ == '__main__':
_main()
try:
_main()
except BrokenPipeError:
pass

View File

@ -0,0 +1,2 @@
:mod:`sysconfig`'s CLI now ignores :exc:`BrokenPipeError`, making it exit
normally if its output is being piped and the pipe closes.