Skip to content

Commit

Permalink
[vstest]: use BytesIO for file operations
Browse files Browse the repository at this point in the history
this is another py3 fix

Signed-off-by: Guohan Lu <[email protected]>
  • Loading branch information
lguohan committed Jul 19, 2020
1 parent 982c9a3 commit d2bab10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d2bab10

Please sign in to comment.