Fix the fetch of the stream generator
glanceclient is changed so we need to support different styles of fetching the stream generator. either next(obj) or obj.next() Change-Id: I88b3485917649c06f724cdda288f91ab2e41ad66
This commit is contained in:
parent
a341023085
commit
97b5c35f01
|
@ -242,6 +242,8 @@ class ReSizeStream(object):
|
|||
while not stop and len(self.reminder) < chunk_size:
|
||||
try:
|
||||
self.reminder += next(self.stream)
|
||||
except TypeError:
|
||||
self.reminder += self.stream.next()
|
||||
except StopIteration:
|
||||
stop = True
|
||||
if stop:
|
||||
|
|
Loading…
Reference in New Issue