diff --git a/glanceclient/common/utils.py b/glanceclient/common/utils.py index 88144ef8..e7c0992e 100644 --- a/glanceclient/common/utils.py +++ b/glanceclient/common/utils.py @@ -298,7 +298,10 @@ def save_image(data, path): :param path: path to save the image to """ if path is None: - image = sys.stdout + if six.PY3: + image = sys.stdout.buffer + else: + image = sys.stdout else: image = open(path, 'wb') try: