File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 39
39
40
40
# DD_API_KEY: Datadog API Key
41
41
DD_API_KEY = "<your_api_key>"
42
- try :
43
- if "DD_KMS_API_KEY" in os .environ :
44
- ENCRYPTED = os .environ ["DD_KMS_API_KEY" ]
45
- DD_API_KEY = boto3 .client ("kms" ).decrypt (
46
- CiphertextBlob = base64 .b64decode (ENCRYPTED )
47
- )["Plaintext" ]
48
- elif "DD_API_KEY" in os .environ :
49
- DD_API_KEY = os .environ ["DD_API_KEY" ]
50
- except Exception :
51
- pass
42
+ if "DD_KMS_API_KEY" in os .environ :
43
+ ENCRYPTED = os .environ ["DD_KMS_API_KEY" ]
44
+ DD_API_KEY = boto3 .client ("kms" ).decrypt (
45
+ CiphertextBlob = base64 .b64decode (ENCRYPTED )
46
+ )["Plaintext" ]
47
+ elif "DD_API_KEY" in os .environ :
48
+ DD_API_KEY = os .environ ["DD_API_KEY" ]
52
49
53
50
# Strip any trailing and leading whitespace from the API key
54
51
DD_API_KEY = DD_API_KEY .strip ()
You can’t perform that action at this time.
0 commit comments