Handle messages with the word message in them.

This commit is contained in:
jakedt 2014-03-07 12:27:30 -05:00
parent 733d4783c5
commit 536a91cbb8

View file

@ -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)