Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit c17a7ca

Browse files
authored
Strip $ from the env var in os.getenv
1 parent e0b2f02 commit c17a7ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

newrelic_python_agent/plugins/postgresql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def connection_arguments(self):
283283
# If value starts with $ and exists as an env var, use that value
284284
if isinstance(value, six.string_types) and value[0] == "$":
285285
# strip the $, check if the env var exists, otherwise fallback
286-
value = os.getenv(value, value)
286+
value = os.getenv(value[1:], value)
287287

288288
if key == 'dbname':
289289
args['database'] = value

0 commit comments

Comments
 (0)