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

Commit 5eb39df

Browse files
authored
Merge pull request #43 from helgi/patch-3
Strip $ from the env var in os.getenv
2 parents a88ac71 + c17a7ca commit 5eb39df

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)