From 54b03a7476ae8c000ff5fa8ede7ef38ad4ba0d7d Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sat, 14 Sep 2019 13:05:52 -0700 Subject: [PATCH] When uploading release assets, ignore those already uploaded. --- tools/upload_release_files.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/upload_release_files.py b/tools/upload_release_files.py index 6c842dc684701..4f193a8bec080 100755 --- a/tools/upload_release_files.py +++ b/tools/upload_release_files.py @@ -25,6 +25,9 @@ with open(full_filename, "rb") as f: response = github.post(url, data=f, headers=headers) if not response.ok: + if response.status_code == 422 and response.json().get("errors", [{"code":""}])[0]["code"] == "already_exists": + print("File already uploaded. Skipping.") + continue print("Upload of {} failed with {}.".format(filename, response.status_code)) print(response.text) sys.exit(response.status_code) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy