Fix UnicodeEncodeErrors in output of 'build', 'run' and 'up'

Squashed version of #125.
Closes #112.
This commit is contained in:
Maurits van Mastrigt 2014-03-03 15:21:53 +01:00 • committed by Aanand Prasad
commit 710cd38591
3 changed files with 3 additions and 3 deletions

View file

@ -295,7 +295,7 @@ class Service(object):
match = re.search(r'Successfully built ([0-9a-f]+)', line)
if match:
image_id = match.group(1)
sys.stdout.write(line)
sys.stdout.write(line.encode(sys.__stdout__.encoding or 'utf8'))
if image_id is None:
raise BuildError()