Skip to content

Commit

Permalink
changed a few .format() occurrences to f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
cmurtaugh committed Sep 10, 2021
1 parent ecc1113 commit 641f92c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dj_secure_settings/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def load_secure_settings(project_name=None, environment=None):
config = {}

try:
_load_params_from_ssm(config, '/{}/defaults/'.format(env))
_load_params_from_ssm(config, '/{}/{}/'.format(env, project_name))
_load_params_from_ssm(config, f'/{env}/defaults/')
_load_params_from_ssm(config, f'/{env}/{project_name}/')
except ExpiredTokenException as e:
# could not load params from Parameter Store, but that may be ok
logging.debug("Couldn't load params from SSM: missing or expired token")
Expand Down Expand Up @@ -114,7 +114,7 @@ def _load_params_from_ssm(config, path_prefix, region_name=None):
more = params.get("NextToken", False)

if params_found == 0:
logging.warning('Found no SSM parameters for prefix {}'.format(path_prefix))
logging.warning(f'Found no SSM parameters for prefix {path_prefix}')


def _set_nested(dic, keys, value):
Expand Down

0 comments on commit 641f92c

Please sign in to comment.