diff --git a/zunclient/common/httpclient.py b/zunclient/common/httpclient.py index f4802ff8..5f89439e 100644 --- a/zunclient/common/httpclient.py +++ b/zunclient/common/httpclient.py @@ -395,7 +395,10 @@ class ResponseBodyIterator(object): def __iter__(self): while True: - yield self.next() + try: + yield self.next() + except StopIteration: + return def next(self): chunk = self.resp.read(CHUNKSIZE)