mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Better handling of exception
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
a564aa2548
commit
3075c12b1e
1 changed files with 3 additions and 1 deletions
|
@ -854,7 +854,9 @@ def backup_previous_releases(ctx: Context, salt_version: str = None):
|
|||
ctx.info(f"A backup prior to releasing {salt_version} has already been done.")
|
||||
ctx.exit(0)
|
||||
except ClientError as exc:
|
||||
if "404" not in str(exc):
|
||||
if "Error" not in exc.response:
|
||||
raise
|
||||
if exc.response["Error"]["Code"] != "404":
|
||||
raise
|
||||
|
||||
files_in_backup: dict[str, datetime] = {}
|
||||
|
|
Loading…
Add table
Reference in a new issue