bitbake-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] compress: Allow to operate on file descriptor
@ 2021-10-13 15:35 Richard Purdie
  2021-10-13 15:35 ` [PATCH 2/2] siggen: Change file format of siginfo files to use zstd compressed json Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2021-10-13 15:35 UTC (permalink / raw)
  To: bitbake-devel

The code works fine if we pass a file descriptor in and we need to
do this from the siggen code so add that as a valid input.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/compress/_pipecompress.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/compress/_pipecompress.py b/lib/bb/compress/_pipecompress.py
index 4b9f662143..5de17a82e2 100644
--- a/lib/bb/compress/_pipecompress.py
+++ b/lib/bb/compress/_pipecompress.py
@@ -49,7 +49,7 @@ def open_wrap(
             raise ValueError("Argument 'newline' not supported in binary mode")
 
     file_mode = mode.replace("t", "")
-    if isinstance(filename, (str, bytes, os.PathLike)):
+    if isinstance(filename, (str, bytes, os.PathLike, int)):
         binary_file = cls(filename, file_mode, **kwargs)
     elif hasattr(filename, "read") or hasattr(filename, "write"):
         binary_file = cls(None, file_mode, fileobj=filename, **kwargs)
-- 
2.32.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-14  8:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 15:35 [PATCH 1/2] compress: Allow to operate on file descriptor Richard Purdie
2021-10-13 15:35 ` [PATCH 2/2] siggen: Change file format of siginfo files to use zstd compressed json Richard Purdie
2021-10-13 21:08   ` [bitbake-devel] " Quentin Schulz
     [not found]     ` <44a0906e6279b9ab34d29f8129d54b598b783397.camel@linuxfoundation.org>
2021-10-14  8:00       ` Quentin Schulz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).