Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

Commit 9179923

Browse files
committed
fix(deploy.py): handle chunked output errors
1 parent 84ef630 commit 9179923

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

rootfs/deploy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ def log_output(stream, decode):
1313
for chunk in stream:
1414
if 'error' in chunk:
1515
error = True
16-
print(chunk.decode('utf-8'))
16+
if isinstance(chunk, basestring): # Change "basestring" to "str" for Python3
17+
print(chunk.decode('utf-8'))
18+
else:
19+
print(chunk['error'].decode('utf-8'))
1720
elif decode:
1821
stream_chunk = chunk.get('stream')
1922
if stream_chunk:

0 commit comments

Comments
 (0)