commit 4e3567523a18eb5519f88199eb81f260346a0e38
Author: Enrico Forestieri <for...@lyx.org>
Date:   Thu Feb 6 10:50:02 2020 +0100

    Fix syntax error with Python 2
    
    Python 2 wants b"..." and gives error win rb"...".
---
 lib/scripts/lyxpreview_tools.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/scripts/lyxpreview_tools.py b/lib/scripts/lyxpreview_tools.py
index 2f8c2f8..05c5aad 100644
--- a/lib/scripts/lyxpreview_tools.py
+++ b/lib/scripts/lyxpreview_tools.py
@@ -219,7 +219,7 @@ def write_metrics_info(metrics_info, metrics_file):
 # Reads a .tex files and create an identical file but only with
 # pages whose index is in pages_to_keep
 def filter_pages(source_path, destination_path, pages_to_keep):
-    def_re = 
re.compile(rb"(\\newcommandx|\\renewcommandx|\\global\\long\\def)(\\[a-zA-Z]+)(.+)")
+    def_re = 
re.compile(b"(\\newcommandx|\\renewcommandx|\\global\\long\\def)(\\[a-zA-Z]+)(.+)")
     source_file = open(source_path, "rb")
     destination_file = open(destination_path, "wb")
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to