]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
misc: get_file must use mode='rb' for py3
authorKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Sat, 14 Dec 2019 01:22:07 +0000 (02:22 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Sun, 15 Mar 2020 00:04:08 +0000 (01:04 +0100)
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
teuthology/misc.py

index 4c9dab01c328d8a414a4e4a13455b9cb2d78ef5f..46847bfe0191788284740495ca8d25b23991f911 100644 (file)
@@ -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