Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sean Leavey
pykat
Commits
418afc9e
Commit
418afc9e
authored
May 3, 2016
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
fixing utf8 pipe reading hopefully
parent
da1f0e11
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pykat/finesse.py
+3
-4
3 additions, 4 deletions
pykat/finesse.py
test/run_tests.py
+5
-2
5 additions, 2 deletions
test/run_tests.py
with
8 additions
and
6 deletions
pykat/finesse.py
+
3
−
4
View file @
418afc9e
...
@@ -28,6 +28,7 @@ from __future__ import division
...
@@ -28,6 +28,7 @@ from __future__ import division
from
__future__
import
print_function
from
__future__
import
print_function
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
import
codecs
import
uuid
import
uuid
import
sys
import
sys
import
os
import
os
...
@@ -1498,8 +1499,6 @@ class kat(object):
...
@@ -1498,8 +1499,6 @@ class kat(object):
duration
=
2
# Duration for searching for open pipe
duration
=
2
# Duration for searching for open pipe
import
codecs
try
:
try
:
while
fifo
is
None
:
while
fifo
is
None
:
try
:
try
:
...
@@ -1517,8 +1516,8 @@ class kat(object):
...
@@ -1517,8 +1516,8 @@ class kat(object):
for
line
in
fifo
:
for
line
in
fifo
:
if
(
sys
.
version_info
<
(
3
,
0
)):
#
if (sys.version_info < (3, 0)):
line
=
line
.
decode
(
"
utf8
"
)
# Make sure we're using unicode encoding
#
line = line.decode("utf8") # Make sure we're using unicode encoding
v
=
line
.
split
(
u
"
:
"
,
1
)
v
=
line
.
split
(
u
"
:
"
,
1
)
...
...
This diff is collapsed.
Click to expand it.
test/run_tests.py
+
5
−
2
View file @
418afc9e
...
@@ -17,7 +17,7 @@ errors = []
...
@@ -17,7 +17,7 @@ errors = []
testdir
=
os
.
getcwd
()
testdir
=
os
.
getcwd
()
print
(
"
----------------------------------------------------------------------------------------
"
)
for
path
,
folders
,
files
in
os
.
walk
(
"
./test_scripts
"
):
for
path
,
folders
,
files
in
os
.
walk
(
"
./test_scripts
"
):
...
@@ -26,6 +26,7 @@ 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
)
filename
=
os
.
path
.
join
(
path
,
filename
)
with
open
(
filename
)
as
f
:
with
open
(
filename
)
as
f
:
print
(
"
!-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
"
)
print
(
"
RUNNING:
"
+
filename
)
print
(
"
RUNNING:
"
+
filename
)
try
:
try
:
os
.
chdir
(
path
)
os
.
chdir
(
path
)
...
@@ -45,7 +46,9 @@ for path, folders, files in os.walk("./test_scripts"):
...
@@ -45,7 +46,9 @@ for path, folders, files in os.walk("./test_scripts"):
sys
.
stderr
.
flush
()
sys
.
stderr
.
flush
()
finally
:
finally
:
os
.
chdir
(
testdir
)
os
.
chdir
(
testdir
)
print
(
"
----------------------------------------------------------------------------------------
"
)
print
(
"
!------------------------------------------------------------------------------------------------
"
)
print
(
""
)
print
(
""
)
if
len
(
errors
)
>
0
:
if
len
(
errors
)
>
0
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment