Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dotenv/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def _is_debugger():
return check_path

if raise_error_if_not_found:
raise IOError("File not found")
raise FileNotFoundError("File not found")

return ""

Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def test_find_dotenv_no_file_raise(tmp_path):
leaf = prepare_file_hierarchy(tmp_path)
os.chdir(leaf)

with pytest.raises(IOError):
with pytest.raises(FileNotFoundError):
dotenv.find_dotenv(raise_error_if_not_found=True, usecwd=True)


Expand Down