From d2bab10efe05e8ec209fd5a360778a2d7c8d7f54 Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Sun, 19 Jul 2020 07:07:38 +0000 Subject: [PATCH] [vstest]: use BytesIO for file operations this is another py3 fix Signed-off-by: Guohan Lu --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 26aed021ab04..75722dfd014d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -421,7 +421,7 @@ def runcmd(self, cmd): return (exitcode, out) def copy_file(self, path, filename): - tarstr = io.StringIO() + tarstr = io.BytesIO() tar = tarfile.open(fileobj=tarstr, mode="w") tar.add(filename, os.path.basename(filename)) tar.close()