From e67c674ed8756106cbb16d924f3e8189bd8d6f86 Mon Sep 17 00:00:00 2001 From: Proton Date: Thu, 2 Feb 2023 11:41:49 +0800 Subject: [PATCH] [ci] Tolerate duplicates when registering version (#7281) Issue: # ### Brief Summary --- misc/save_new_version.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/misc/save_new_version.py b/misc/save_new_version.py index 1db89916a374e..0a65421d1725c 100644 --- a/misc/save_new_version.py +++ b/misc/save_new_version.py @@ -28,11 +28,15 @@ json=payload, auth=(username, password), timeout=5) + r = response.json() + print(r) response.raise_for_status() except requests.exceptions.ConnectionError as err: print('Updating latest version failed: No internet,', err) exit(1) except requests.exceptions.HTTPError as err: + if 'duplicate' in r['message']: + exit(0) print('Updating latest version failed: Server error,', err) exit(1) except requests.exceptions.Timeout as err: @@ -43,5 +47,4 @@ print('Updating latest version failed:', err) exit(1) -response = response.json() -print(response['message']) +exit(0)