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
MetObs
AossCeilo
Commits
f1b9a383
Unverified
Commit
f1b9a383
authored
Sep 07, 2017
by
David Hoese
Browse files
Fix ingest reading in bytes in python 3
parent
c46fbdda
Changes
1
Hide whitespace changes
Inline
Side-by-side
aossceilo/ingest.py
View file @
f1b9a383
...
...
@@ -98,11 +98,11 @@ def init_ceilo(portdev):
"CLOSE
\r\n
"
)
for
line
in
init_commands
:
LOG
.
log
(
9
,
"SEND: %s"
,
line
.
strip
())
port
.
write
(
line
)
port
.
write
(
line
.
encode
(
'ascii'
)
)
port
.
flush
()
lines
=
port
.
readlines
()
for
l
in
lines
:
LOG
.
log
(
9
,
"RECV: %s"
,
l
.
strip
())
LOG
.
log
(
9
,
"RECV: %s"
,
l
.
decode
().
strip
())
port
.
close
()
...
...
@@ -188,7 +188,7 @@ def main():
LOG
.
log
(
9
,
"got log %s"
,
fptr
.
name
)
try
:
in_lines
=
port
.
readlines
()
in_lines
=
[
x
.
decode
()
for
x
in
port
.
readlines
()
]
LOG
.
debug
(
"read %s lines"
,
len
(
in_lines
))
num_hdrs
,
out_lines
=
process_lines
(
in_lines
,
datetime
.
now
())
...
...
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