Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit 236e5b4

Browse files
Might as well always used bytes()
1 parent ad7307b commit 236e5b4

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

virtualbox/library_ext/guest_session.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,11 @@ def execute(self, command, arguments=[], stdin="", environment=[],
4545
def read_out(process, flags, stdout, stderr):
4646
if library.ProcessCreateFlag.wait_for_std_err in flags:
4747
process.wait_for(int(library.ProcessWaitResult.std_err))
48-
e = process.read(2, 65000, 0)
49-
if isinstance(e, memoryview):
50-
e = bytes(e)
48+
e = bytes(process.read(2, 65000, 0))
5149
stderr.append(e)
5250
if library.ProcessCreateFlag.wait_for_std_out in flags:
5351
process.wait_for(int(library.ProcessWaitResult.std_out))
54-
o = process.read(1, 65000, 0)
55-
if isinstance(o, memoryview):
56-
o = bytes(o)
52+
o = bytes(process.read(1, 65000, 0))
5753
stdout.append(o)
5854

5955
process = self.process_create_ex(command,

0 commit comments

Comments
 (0)