Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
finesse
pykat
Commits
84ca9b5f
Commit
84ca9b5f
authored
Oct 15, 2020
by
JanJust Keijser
Browse files
decode (possibly) binary output streams when running kat -v or kat -h
parent
c3f66ee9
Changes
1
Hide whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
84ca9b5f
...
...
@@ -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"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment