From: Kyr Shatskyy Date: Sat, 14 Dec 2019 01:22:07 +0000 (+0100) Subject: misc: get_file must use mode='rb' for py3 X-Git-Tag: 1.1.0~144^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=72567caa3d9f6eb7d7f728ddb4c05c7b94ff9bb6;p=teuthology.git misc: get_file must use mode='rb' for py3 Signed-off-by: Kyr Shatskyy --- diff --git a/teuthology/misc.py b/teuthology/misc.py index 4c9dab01c..46847bfe0 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -749,7 +749,7 @@ def get_file(remote, path, sudo=False, dest_dir='/tmp'): Remote.get_file() instead. """ local_path = remote.get_file(path, sudo=sudo, dest_dir=dest_dir) - with open(local_path) as file_obj: + with open(local_path, 'rb') as file_obj: file_data = file_obj.read() os.remove(local_path) return file_data