From: Juergen Spitzmueller Date: Fri, 13 Oct 2017 08:04:27 +0000 (+0200) Subject: Fix literal string in binary context X-Git-Tag: 2.3.0rc1~47 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=bbac6b70378cffed1e8abc33882d00b06f0d0fec;p=features.git Fix literal string in binary context In 1a26f9b26cff827da5, all strings in the context of regexes and comparisons have been converted to byte-like objects for python2/3 compatibility reasons. This has not been considered in the later commit 5c545573507bb, which makes layout2layout break with TypeError: can't concat str to bytes. (cherry picked from commit 8fecdfc473d067f9caa79dffa7ab078d391d50ed) --- diff --git a/lib/scripts/layout2layout.py b/lib/scripts/layout2layout.py index eebacf883d..77cafa048a 100644 --- a/lib/scripts/layout2layout.py +++ b/lib/scripts/layout2layout.py @@ -471,7 +471,7 @@ def convert(lines, end_format): re_trimEndLabelString, re_trimLabelCounter): m = r.match(lines[i]) if m: - lines[i] = m.group(1) + '"' + m.group(2) + '"' + lines[i] = m.group(1) + b'"' + m.group(2) + b'"' i += 1 continue