From: Günter Milde Date: Thu, 28 Feb 2019 21:59:30 +0000 (+0100) Subject: Fix AttributeError with Python 3. X-Git-Tag: lyx-2.4.0dev-acb2ca7b~2535 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9abd46b4d5056d11e4b92063aaadd4d5fa73361c;p=features.git Fix AttributeError with Python 3. At least since Python 3.5, `output` is already a (unicode) string and does not have a "decode" method. --- diff --git a/lib/scripts/convertDefault.py b/lib/scripts/convertDefault.py index 8678965013..0c9b6a60db 100644 --- a/lib/scripts/convertDefault.py +++ b/lib/scripts/convertDefault.py @@ -35,7 +35,10 @@ if fout.close() != None: output = fout.readline() fout.close() if not PY2: - output = output.decode() + # Ensure we have a (unicode) string object in Python3 + # (not required for version >= 3.5). + # FIXME: Check whether this is required with any supported 3.x version! + output = str(output) version = re_version.match(output)