Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions virtualbox/library_ext/guest_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ def execute(self, command, arguments=[], stdin="", environment=[],
def read_out(process, flags, stdout, stderr):
if library.ProcessCreateFlag.wait_for_std_err in flags:
process.wait_for(int(library.ProcessWaitResult.std_err))
e = str(process.read(2, 65000, 0))
e = bytes(process.read(2, 65000, 0))
stderr.append(e)
if library.ProcessCreateFlag.wait_for_std_out in flags:
process.wait_for(int(library.ProcessWaitResult.std_out))
o = str(process.read(1, 65000, 0))
o = bytes(process.read(1, 65000, 0))
stdout.append(o)

process = self.process_create_ex(command,
Expand Down Expand Up @@ -85,7 +85,7 @@ def read_out(process, flags, stdout, stderr):
# make sure we have read the remainder of the out
read_out(process, flags, stdout, stderr)

return process, "".join(stdout), "".join(stderr)
return process, b"".join(stdout), b"".join(stderr)

def makedirs(self, path, mode=0x777):
"Super-mkdir: create a leaf directory and all intermediate ones."
Expand Down