From f3525c008524d6f822126858ffbdfa80345b6739 Mon Sep 17 00:00:00 2001 From: Yedidyah Bar David Date: Thu, 8 Sep 2022 15:22:36 +0300 Subject: [PATCH] packaging: setup: remote_engine: manual_files: Read as binary Make remote_engine_manual_files.py match the behavior of remote_engine_root_ssh.py, and so make 'copy_from_engine' return a bytes object, not str. This should fix the bug that [1] was supposed to fix, but [1] only fixed it for the 'manual files' mode and broke paramiko/ssh. [1] https://github.com/oVirt/ovirt-dwh/commit/885d65f0594dee08a48fbe48bdf697de7bcceb6b Change-Id: I32cd8aff5e851fb053b2cd5b8237455ce2230a35 Signed-off-by: Yedidyah Bar David --- .../base/remote_engine/remote_engine_manual_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/setup/plugins/ovirt-engine-common/base/remote_engine/remote_engine_manual_files.py b/packaging/setup/plugins/ovirt-engine-common/base/remote_engine/remote_engine_manual_files.py index 4d4b3b4d226..ed3562473cf 100644 --- a/packaging/setup/plugins/ovirt-engine-common/base/remote_engine/remote_engine_manual_files.py +++ b/packaging/setup/plugins/ovirt-engine-common/base/remote_engine/remote_engine_manual_files.py @@ -83,7 +83,7 @@ def copy_from_engine(self, file_name, dialog_name=None): ), prompt=True, ) - with open(resfilename) as f: + with open(resfilename, 'rb') as f: res = f.read() return res