diff --git a/virtualbox/library_ext/guest_session.py b/virtualbox/library_ext/guest_session.py index c4801a4..a933355 100644 --- a/virtualbox/library_ext/guest_session.py +++ b/virtualbox/library_ext/guest_session.py @@ -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, @@ -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."