Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
finesse
pykat
Commits
418afc9e
Commit
418afc9e
authored
May 03, 2016
by
Daniel Brown
Browse files
fixing utf8 pipe reading hopefully
parent
da1f0e11
Pipeline
#950
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
418afc9e
...
...
@@ -28,6 +28,7 @@ from __future__ import division
from
__future__
import
print_function
from
__future__
import
unicode_literals
import
codecs
import
uuid
import
sys
import
os
...
...
@@ -1498,8 +1499,6 @@ class kat(object):
duration
=
2
# Duration for searching for open pipe
import
codecs
try
:
while
fifo
is
None
:
try
:
...
...
@@ -1517,8 +1516,8 @@ class kat(object):
for
line
in
fifo
:
if
(
sys
.
version_info
<
(
3
,
0
)):
line
=
line
.
decode
(
"utf8"
)
# Make sure we're using unicode encoding
#
if (sys.version_info < (3, 0)):
#
line = line.decode("utf8") # Make sure we're using unicode encoding
v
=
line
.
split
(
u
":"
,
1
)
...
...
test/run_tests.py
View file @
418afc9e
...
...
@@ -17,7 +17,7 @@ errors = []
testdir
=
os
.
getcwd
()
print
(
"----------------------------------------------------------------------------------------"
)
for
path
,
folders
,
files
in
os
.
walk
(
"./test_scripts"
):
...
...
@@ -26,6 +26,7 @@ for path, folders, files in os.walk("./test_scripts"):
filename
=
os
.
path
.
join
(
path
,
filename
)
with
open
(
filename
)
as
f
:
print
(
"!-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
)
print
(
"RUNNING: "
+
filename
)
try
:
os
.
chdir
(
path
)
...
...
@@ -45,7 +46,9 @@ for path, folders, files in os.walk("./test_scripts"):
sys
.
stderr
.
flush
()
finally
:
os
.
chdir
(
testdir
)
print
(
"----------------------------------------------------------------------------------------"
)
print
(
"!------------------------------------------------------------------------------------------------"
)
print
(
""
)
print
(
""
)
if
len
(
errors
)
>
0
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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