Fix AttributeError with Python 3.

At least since Python 3.5, `output` is already a
(unicode) string and does not have a "decode" method.
This commit is contained in:
Günter Milde 2019-02-28 22:59:30 +01:00
parent e665715fc4
commit 9abd46b4d5

View File

@ -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)