Skip to content

Commit c0d4772

Browse files
Add warning when load_dotenv has been disabled
1 parent e293438 commit c0d4772

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/dotenv/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ def load_dotenv(
351351
to this function as `dotenv_path`.
352352
"""
353353
if _dotenv_autoload_disabled():
354+
logger.warning(
355+
"python-dotenv has been disabled by DOTENV_AUTOLOAD_DISABLED environmental variable"
356+
)
354357
return False
355358

356359
if dotenv_path is None and stream is None:

0 commit comments

Comments
 (0)