Merge "Fix image-download to stdout on Python 3.x"

This commit is contained in:
Jenkins
2015-12-22 13:24:22 +00:00
committed by Gerrit Code Review

View File

@@ -298,6 +298,9 @@ def save_image(data, path):
:param path: path to save the image to
"""
if path is None:
if six.PY3:
image = sys.stdout.buffer
else:
image = sys.stdout
else:
image = open(path, 'wb')