Skip to content

Commit 2da69b9

Browse files
Merge pull request #1072 from reef-technologies/brokenpipe
Avoid failing on BrokenPipeError when running commands
2 parents 97dc69a + 9495064 commit 2da69b9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

b2/_internal/console_tool.py

+4
Original file line numberDiff line numberDiff line change
@@ -5475,6 +5475,10 @@ def run_command(self, argv):
54755475
logger.exception('ConsoleTool command interrupt')
54765476
self._print_stderr('\nInterrupted. Shutting down...\n')
54775477
return 1
5478+
except BrokenPipeError:
5479+
# The command output has been likely piped in a shell
5480+
logger.debug('ConsoleTool broken pipe error', exc_info=True)
5481+
return 0
54785482
except Exception:
54795483
logger.exception('ConsoleTool unexpected exception')
54805484
raise

changelog.d/1071.fixed.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Avoid failing on BrokenPipeError when running commands.

0 commit comments

Comments
 (0)