We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ee87a0 commit 9f94665Copy full SHA for 9f94665
b2sdk/_internal/transfer/inbound/downloaded_file.py
@@ -274,6 +274,12 @@ def save_to(
274
try:
275
with context as file:
276
return self.save(file, allow_seeking=allow_seeking)
277
+ except BrokenPipeError as ex:
278
+ if is_stdout:
279
+ # Output was likely piped through a command such as head. Just ignore the error
280
+ return
281
+ else:
282
+ raise ex
283
finally:
284
if not is_stdout:
285
set_file_mtime(path_, self.download_version.mod_time_millis)
changelog.d/534.fixed.md
@@ -0,0 +1 @@
1
+Suppress BrokenPipeError when saving downloaded content to stdout.
0 commit comments