Update upload-pkg.py

This commit is contained in:
Molly Sophia 2023-12-21 07:19:50 +00:00
parent 4d03704379
commit 3ea22b9830

View File

@ -103,10 +103,13 @@ def UploadPackage(
)
text = GetReasonText(res)
if res.status_code != 200:
raise RequestException(
"update status not 201: %d (%s)" %
(res.status_code, text)
)
if res.status_code == 409:
info("target already exists; not overwritting")
else:
raise RequestException(
"update status not 201: %d (%s)" %
(res.status_code, text)
)
info("upload done")
finally:
delete("%s/%s" % (server, pkg_name))