Iterate one more time before failing iso download

Signed-off-by: sanjeev <sanjeev@apache.org>
This commit is contained in:
sanjeev 2015-02-04 15:24:07 +05:30
parent a7b8e987d3
commit 67268d9db3
1 changed files with 4 additions and 0 deletions

View File

@ -1343,6 +1343,7 @@ class Iso:
def download(self, apiclient, timeout=5, interval=60):
"""Download an ISO"""
# Ensuring ISO is successfully downloaded
retry = 1
while True:
time.sleep(interval)
@ -1360,6 +1361,9 @@ class Iso:
return
elif 'Downloaded' not in response.status and \
'Installing' not in response.status:
if retry == 1:
retry = retry - 1
continue
raise Exception(
"Error In Downloading ISO: ISO Status - %s" %
response.status)