Commit 89ccbe6
Muhamed Fazal PS
fix: raise FileNotFoundError for missing TLS material (fixes #7564)
When a TLS certificate or key file is not found, the code currently
raises a generic OSError. This changes it to raise FileNotFoundError
with the proper errno (ENOENT) and filename attribute, which is more
specific and allows callers to catch this specific case.
FileNotFoundError is a subclass of OSError, so this is backward
compatible with existing code that catches OSError.1 parent f361ead commit 89ccbe6
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
353 | 354 | | |
354 | 355 | | |
355 | 356 | | |
356 | | - | |
| 357 | + | |
| 358 | + | |
357 | 359 | | |
358 | | - | |
| 360 | + | |
| 361 | + | |
359 | 362 | | |
360 | 363 | | |
361 | | - | |
362 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
363 | 368 | | |
364 | 369 | | |
365 | 370 | | |
| |||
0 commit comments