Signed-off-by: EFanZh <efanzh@gmail.com>
This commit is contained in:
EFanZh 2019-07-30 09:53:38 +08:00
parent 17c86429e4
commit 719e040075
1 changed files with 7 additions and 6 deletions

View File

@ -382,13 +382,14 @@ class ImageCollection(Collection):
images = []
for chunk in resp:
if 'stream' in chunk:
match = re.search(
images.extend(
match.group(2)
for match in re.finditer(
r'(^Loaded image ID: |^Loaded image: )(.+)$',
chunk['stream']
chunk['stream'],
re.M
)
)
if match:
image_id = match.group(2)
images.append(image_id)
if 'error' in chunk:
raise ImageLoadError(chunk['error'])