mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add fix for else code path
This commit is contained in:
parent
9398c44945
commit
aef5a8898c
1 changed files with 11 additions and 2 deletions
|
@ -474,8 +474,17 @@ def _refresh_buckets_cache_file(cache_file):
|
|||
continue
|
||||
except KeyError:
|
||||
# no human readable error message provided
|
||||
log.warning("'{0}' response for bucket '{1}'".format(meta_response['Code'], bucket_name))
|
||||
continue
|
||||
if 'Code' in meta_response:
|
||||
log.warning(
|
||||
("'{0}' response for "
|
||||
"bucket '{1}'").format(meta_response['Code'],
|
||||
bucket_name))
|
||||
continue
|
||||
else:
|
||||
log.warning(
|
||||
('S3 Error! Do you have any files '
|
||||
'in your S3 bucket?'))
|
||||
return {}
|
||||
|
||||
environments = [(os.path.dirname(k['Key']).split('/', 1))[0] for k in files]
|
||||
environments = set(environments)
|
||||
|
|
Loading…
Add table
Reference in a new issue