Skip to content

Commit a47504e

Browse files
committed
Fix docs for retrieving missing environment variable.
Fixes #3456
1 parent 31c31a3 commit a47504e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/changelog/3456.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updates the documentation for ``os.environ['KEY']`` when the variable does not exist - by :user:`jugmac00`.

docs/config.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,8 @@ If you specify a substitution string like this::
16351635

16361636
{env:KEY}
16371637

1638-
then the value will be retrieved as ``os.environ['KEY']`` and raise an Error if the environment variable does not exist.
1638+
then the value will be retrieved as ``os.environ['KEY']`` and replaced with an empty string if the environment variable
1639+
does not exist.
16391640

16401641

16411642
Environment variable substitutions with default values

0 commit comments

Comments
 (0)