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()