Skip to content

Commit

Permalink
allow config setup to continue without crashing if no region is set
Browse files Browse the repository at this point in the history
  • Loading branch information
jnhmcknight committed Jun 14, 2023
1 parent f3a9caa commit bdb823c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dynaconf_aws_loader/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import os
import logging
import boto3
from botocore.exceptions import ClientError, BotoCoreError
from botocore.exceptions import ClientError, BotoCoreError, NoRegionError

from dynaconf.utils import build_env_list
from dynaconf.utils.parse_conf import parse_conf_data
Expand Down Expand Up @@ -82,7 +82,13 @@ def load(
"""

client = get_client(obj)
try:
client = get_client(obj)
except NoRegionError as exc:
logging.exception(exc)
# We have no region, therefore, we cannot load anything. Just return
return

env_list = build_env_list(obj, env or obj.current_env)

project_prefix: str = obj.get(
Expand Down

0 comments on commit bdb823c

Please sign in to comment.