From: Idan Pazi Date: Fri, 16 Feb 2024 13:17:17 +0000 (+0200) Subject: Fix returned value of win32file.ReadFile X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0fb7650786e9574d978015b8986686e10b2330e8;p=features.git Fix returned value of win32file.ReadFile returns an PyOVERLAPPEDReadBuffer that needs to be converted to str. --- diff --git a/lib/scripts/lyxpreview_tools.py b/lib/scripts/lyxpreview_tools.py index 1a6b1c1f7f..c75563d464 100644 --- a/lib/scripts/lyxpreview_tools.py +++ b/lib/scripts/lyxpreview_tools.py @@ -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: