]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/lyxpreview_tools.py
Remove profiling.py
[lyx.git] / lib / scripts / lyxpreview_tools.py
index 1a6b1c1f7fdfb23ef28122a0708aa9fb166b7985..56ff33e38b168fed032ff4dc260446420672ff8e 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:
@@ -300,7 +300,7 @@ def run_latex(latex, latex_file, bibtex = None):
 
 
 def run_tex(tex, tex_file):
-    tex_call = '%s "%s"' % (tex, tex_file)
+    tex_call = f'{tex} "{tex_file}"'
 
     tex_status, tex_stdout = run_command(tex_call)
     if tex_status:
@@ -347,7 +347,7 @@ def check_latex_log(log_file):
                 found_error = False
                 match = data_re.search(line)
                 if match == None:
-                    error("Unexpected data in %s\n%s" % (log_file, line))
+                    error(f"Unexpected data in {log_file}\n{line}")
 
                 error_pages.append(int(match.group(1)))