From e7a20eecc0b9b1be99446760de3ad98813417350 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Sun, 7 Jan 2018 20:38:24 +0400 Subject: [PATCH] Fix read_in_chunks on Python 3.7 According to https://www.python.org/dev/peps/pep-0479/#id41, this will stop working in Python 3.7: fix it now. --- libcloud/utils/files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcloud/utils/files.py b/libcloud/utils/files.py index ca109f791e..ef03c85cf0 100644 --- a/libcloud/utils/files.py +++ b/libcloud/utils/files.py @@ -83,7 +83,7 @@ def read_in_chunks(iterator, chunk_size=None, fill_size=False, if empty and yield_empty: yield b('') - raise StopIteration + return if fill_size: if empty or len(data) >= chunk_size: