1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-16 10:36:13 +01:00

Merge branch 'fix_HTTPError_reason' of https://github.com/lethliel/osc

Fix str formatting in build.get_preinstall_image.
This commit is contained in:
Marcus Huewe 2020-04-01 13:29:25 +02:00
commit 07d422063b

View File

@ -317,7 +317,7 @@ def get_preinstall_image(apiurl, arch, cache_dir, img_info):
try: try:
gr.urlgrab(url, filename=ifile_path_part, text='fetching image') gr.urlgrab(url, filename=ifile_path_part, text='fetching image')
except HTTPError as e: except HTTPError as e:
print("Failed to download! ecode:%i reason:%i" % (e.code, e.reason)) print("Failed to download! ecode:%i reason:%s" % (e.code, e.reason))
return ('', '', []) return ('', '', [])
# download ok, rename partial file to final file name # download ok, rename partial file to final file name
os.rename(ifile_path_part, ifile_path) os.rename(ifile_path_part, ifile_path)