From 9abd46b4d5056d11e4b92063aaadd4d5fa73361c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Milde?= Date: Thu, 28 Feb 2019 22:59:30 +0100 Subject: [PATCH] Fix AttributeError with Python 3. At least since Python 3.5, `output` is already a (unicode) string and does not have a "decode" method. --- lib/scripts/convertDefault.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)