Reorganize conditional branches to improve readability

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2015-11-11 11:21:24 -08:00
parent b8b4c84573
commit c573fcc70a
1 changed files with 20 additions and 17 deletions

View File

@ -19,9 +19,12 @@ def stream_output(output, stream):
if not is_progress_event: if not is_progress_event:
print_output_event(event, stream, is_terminal) print_output_event(event, stream, is_terminal)
stream.flush() stream.flush()
continue
if not is_terminal:
continue
# if it's a progress event and we have a terminal, then display the progress bars # if it's a progress event and we have a terminal, then display the progress bars
elif is_terminal:
image_id = event.get('id') image_id = event.get('id')
if not image_id: if not image_id:
continue continue