]> git.lyx.org Git - features.git/commitdiff
Fix returned value of win32file.ReadFile
authorIdan Pazi <idan.kp@gmail.com>
Fri, 16 Feb 2024 13:17:17 +0000 (15:17 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 12 Mar 2024 11:46:04 +0000 (12:46 +0100)
returns an PyOVERLAPPEDReadBuffer that needs to be converted to str.

lib/scripts/lyxpreview_tools.py

index 1a6b1c1f7fdfb23ef28122a0708aa9fb166b7985..c75563d4644a79bbabc2698d2287b904611595c6 100644 (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: