Fix returned value of win32file.ReadFile

returns an PyOVERLAPPEDReadBuffer that needs to be converted to str.
This commit is contained in:
Idan Pazi 2024-02-16 15:17:17 +02:00 committed by Juergen Spitzmueller
parent 7e6597a5b4
commit 0fb7650786

View File

@ -165,7 +165,7 @@ def run_command_win32(cmd):
try:
hr, buffer = win32file.ReadFile(stdout_r, 4096)
if hr != winerror.ERROR_IO_PENDING:
data = data + buffer
data = data + str(buffer)
except pywintypes.error as e:
if e.args[0] != winerror.ERROR_BROKEN_PIPE: