Skip to content

Commit

Permalink
fix(parsing): if config is None or [], convert to empty dict
Browse files Browse the repository at this point in the history
  • Loading branch information
Avantol13 committed Mar 2, 2020
1 parent 029bdb1 commit 868ec89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fence/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def _check_s3_buckets(app):
Function to ensure that all s3_buckets have a valid credential.
Additionally, if there is no region it will produce a warning then trys to fetch and cache the region.
"""
buckets = config.get("S3_BUCKETS", {})
aws_creds = config.get("AWS_CREDENTIALS", {})
buckets = config.get("S3_BUCKETS") or {}
aws_creds = config.get("AWS_CREDENTIALS") or {}

for bucket_name, bucket_details in buckets.items():
cred = bucket_details.get("cred")
Expand Down

0 comments on commit 868ec89

Please sign in to comment.