From d080eaa163620c29848f2311064dd919c051234c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 13 Oct 2021 16:11:02 +0100 Subject: bitbake: compress: Allow to operate on file descriptor 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. (Bitbake rev: fc8d74b7de576005ecf67920501dc7e694880fda) Signed-off-by: Richard Purdie --- bitbake/lib/bb/compress/_pipecompress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/compress/_pipecompress.py b/bitbake/lib/bb/compress/_pipecompress.py index 4b9f662143..5de17a82e2 100644 --- a/bitbake/lib/bb/compress/_pipecompress.py +++ b/bitbake/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) -- cgit v1.2.3-54-g00ecf