0
我使用下面的代码从ECR返回版本列表。问题是我试图比较的版本在第2页。但是循环在第一页之后退出,因为ECR图像不在第一页上,而是在第二页上。比较结束后,退出所有页面的最佳方式是什么?Boto3 ECR分数器循环
for page in response_iterator:
images = page['imageIds']
for image in images:
if image['imageTag'] == version:
print('image found')
break
else:
print('ECR not found')
exit(1)
工作就像一个魅力..谢谢.. – user2040074