From 536a91cbb89ff64c5745abe2c70b7068c8cc4c2b Mon Sep 17 00:00:00 2001 From: jakedt Date: Fri, 7 Mar 2014 12:27:30 -0500 Subject: [PATCH] Handle messages with the word message in them. --- workers/dockerfilebuild.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/workers/dockerfilebuild.py b/workers/dockerfilebuild.py index 1a3625940..398b33842 100644 --- a/workers/dockerfilebuild.py +++ b/workers/dockerfilebuild.py @@ -115,7 +115,13 @@ class DockerfileBuildContext(object): current_step = 0 built_image = None for status in unwrap_stream(build_status): - fully_unwrapped = status['message'] if 'message' in status else status + fully_unwrapped = "" + if isinstance(status, dict): + if len(status) > 0: + fully_unwrapped = status.values()[0] + elif isinstance(status, basestring): + fully_unwrapped = status + status_str = str(fully_unwrapped.encode('utf-8')) logger.debug('Status: %s', status_str) step_increment = re.search(r'Step ([0-9]+) :', status_str)