diff options
Diffstat (limited to 'bitbake/lib/bb/compress/_pipecompress.py')
-rw-r--r-- | bitbake/lib/bb/compress/_pipecompress.py | 2 |
1 files changed, 1 insertions, 1 deletions
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( | |||
49 | raise ValueError("Argument 'newline' not supported in binary mode") | 49 | raise ValueError("Argument 'newline' not supported in binary mode") |
50 | 50 | ||
51 | file_mode = mode.replace("t", "") | 51 | file_mode = mode.replace("t", "") |
52 | if isinstance(filename, (str, bytes, os.PathLike)): | 52 | if isinstance(filename, (str, bytes, os.PathLike, int)): |
53 | binary_file = cls(filename, file_mode, **kwargs) | 53 | binary_file = cls(filename, file_mode, **kwargs) |
54 | elif hasattr(filename, "read") or hasattr(filename, "write"): | 54 | elif hasattr(filename, "read") or hasattr(filename, "write"): |
55 | binary_file = cls(None, file_mode, fileobj=filename, **kwargs) | 55 | binary_file = cls(None, file_mode, fileobj=filename, **kwargs) |