Skip to content

Commit

Permalink
Update Packaging for 2.0.0 RC 1 (#107)
Browse files Browse the repository at this point in the history
* Update packaging

* Pylint and CI
  • Loading branch information
bryanculver authored Sep 6, 2023
1 parent b410a89 commit 0f3f212
Show file tree
Hide file tree
Showing 4 changed files with 923 additions and 636 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on: # yamllint disable-line rule:truthy rule:comments
branches:
- "main"
- "develop"
- "next-2.0"
tags:
- "v*"
pull_request: ~
Expand Down
15 changes: 8 additions & 7 deletions nautobot_secrets_providers/providers/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,14 @@ def get_value_for_secret(cls, secret, obj=None, **kwargs):
raise exceptions.SecretValueNotFoundError(secret, cls, str(err))

raise exceptions.SecretProviderError(secret, cls, str(err))
else:
try:
# Fetch the Value field from the parameter which must be a json field.
data = json.loads(get_secret_value_response["Parameter"]["Value"])
except ValueError as err:
msg = "InvalidJson"
raise exceptions.SecretValueNotFoundError(secret, cls, msg) from err

try:
# Fetch the Value field from the parameter which must be a json field.
data = json.loads(get_secret_value_response["Parameter"]["Value"])
except ValueError as err:
msg = "InvalidJson"
raise exceptions.SecretValueNotFoundError(secret, cls, msg) from err

try:
# Return the value of the secret key configured in the nautobot secret.
return data[parameters.get("key")]
Expand Down
Loading

0 comments on commit 0f3f212

Please sign in to comment.