commit 9abd46b4d5056d11e4b92063aaadd4d5fa73361c
Author: Günter Milde <[email protected]>
Date: Thu Feb 28 22:59:30 2019 +0100
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 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/lib/scripts/convertDefault.py b/lib/scripts/convertDefault.py
index 8678965..0c9b6a6 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)