Commit 84ca9b5f authored by JanJust Keijser's avatar JanJust Keijser
Browse files

decode (possibly) binary output streams when running kat -v or kat -h

parent c3f66ee9
......@@ -2071,11 +2071,11 @@ class kat(object):
p = Popen([self._finesse_exec(kat_binary), '-v'], stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
if err:
raise pkex.BasePyKatException("Error getting version: " + str(err.decode("utf-8")))
if err is not None:
raise pkex.BasePyKatException("Error getting version: " + str(err))
vals = str(out).split()
vals = str(out.decode("utf-8")).split()
return vals[2][1:-2] #Format: Finesse 2.2 (2.2-0-g994eac8), 03.07.2017
......@@ -2099,8 +2099,8 @@ class kat(object):
out, err = p.communicate()
if err is not None:
raise pkex.BasePyKatException("Error getting version: " + str(err))
if err:
raise pkex.BasePyKatException("Error getting syntax: " + str(err.decode("utf-8")))
print(out.decode("utf-8"))
return out.decode("utf-8")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment