Skip to content
Snippets Groups Projects
Unverified Commit f1b9a383 authored by David Hoese's avatar David Hoese
Browse files

Fix ingest reading in bytes in python 3

parent c46fbdda
No related branches found
No related tags found
No related merge requests found
...@@ -98,11 +98,11 @@ def init_ceilo(portdev): ...@@ -98,11 +98,11 @@ def init_ceilo(portdev):
"CLOSE\r\n") "CLOSE\r\n")
for line in init_commands: for line in init_commands:
LOG.log(9, "SEND: %s", line.strip()) LOG.log(9, "SEND: %s", line.strip())
port.write(line) port.write(line.encode('ascii'))
port.flush() port.flush()
lines = port.readlines() lines = port.readlines()
for l in lines: for l in lines:
LOG.log(9, "RECV: %s", l.strip()) LOG.log(9, "RECV: %s", l.decode().strip())
port.close() port.close()
...@@ -188,7 +188,7 @@ def main(): ...@@ -188,7 +188,7 @@ def main():
LOG.log(9, "got log %s", fptr.name) LOG.log(9, "got log %s", fptr.name)
try: try:
in_lines = port.readlines() in_lines = [x.decode() for x in port.readlines()]
LOG.debug("read %s lines", len(in_lines)) LOG.debug("read %s lines", len(in_lines))
num_hdrs, out_lines = process_lines(in_lines, datetime.now()) num_hdrs, out_lines = process_lines(in_lines, datetime.now())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment