Commit d6059553 authored by Valentin Reis's avatar Valentin Reis

Merge branch '45-cmd-stdout-flushing' into 'master'

Resolve "`cmd` stdout flushing"

Closes #45

See merge request !78
parents 255e4bc9 d4c8aa1d
Pipeline #6462 passed with stages
in 3 minutes and 50 seconds
......@@ -83,14 +83,12 @@ class CommandLineInterface(object):
if msg.type == "power":
print("%s, %s, %s" % (msg.type, time.time(),
msg.total))
sys.stdout.flush()
if msg.type == "container_exit":
print("%s, %s, %s" % (msg.type, time.time(),
msg.profile_data))
sys.stdout.flush()
else:
print("%s, %s" % (msg.type, time.time()))
sys.stdout.flush()
sys.stdout.flush()
print_if_filter()
# if argv.uuid:
......@@ -157,12 +155,14 @@ class CommandLineInterface(object):
outeof = True
else:
print(msg.payload)
sys.stdout.flush()
elif msg.type == 'stderr':
logger.debug("container msg: %r", msg)
if msg.payload == 'eof':
erreof = True
else:
print(msg.payload, file=sys.stderr)
sys.stdout.flush()
elif msg.type == 'process_exit':
logger.info("process ended: %r", msg)
state = 'exiting'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment