mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix latest_error referenced before assignment
This commit is contained in:
parent
bd2ab32e3f
commit
4ba7cf6d1b
@ -56,18 +56,20 @@ def get_images_with_versions(
|
||||
for i in range(10):
|
||||
try:
|
||||
logging.info("Pulling image %s", docker_image)
|
||||
latest_error = subprocess.check_output(
|
||||
subprocess.check_output(
|
||||
f"docker pull {docker_image}",
|
||||
stderr=subprocess.STDOUT,
|
||||
shell=True,
|
||||
)
|
||||
break
|
||||
except Exception as ex:
|
||||
latest_error = ex
|
||||
time.sleep(i * 3)
|
||||
logging.info("Got execption pulling docker %s", ex)
|
||||
else:
|
||||
raise Exception(
|
||||
f"Cannot pull dockerhub for image docker pull {docker_image} because of {latest_error}"
|
||||
"Cannot pull dockerhub for image docker pull "
|
||||
f"{docker_image} because of {latest_error}"
|
||||
)
|
||||
|
||||
return docker_images
|
||||
|
Loading…
Reference in New Issue
Block a user