Skip to content

Commit 4a79b59

Browse files
Fix: Use FileNotFoundError for file not found in main.py
Replaced IOError with FileNotFoundError on line 320 of main.py to use a more specific and appropriate exception for file not found errors.
1 parent 01f8997 commit 4a79b59

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/dotenv/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,10 @@ def _is_debugger():
317317
return check_path
318318

319319
if raise_error_if_not_found:
320-
raise IOError("File not found")
321-
320+
raise FileNotFoundError("File not found")
322321
return ""
322+
323+
323324

324325

325326
def load_dotenv(

0 commit comments

Comments
 (0)