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)