(
error: &std::io::Error,
filename: impl Into<OsPathOrFd<'a>>,
vm: &VirtualMachine,
)
| 333 | /// `[Errno X]` format instead of `[WinError X]`. |
| 334 | #[must_use] |
| 335 | pub(crate) fn with_filename_from_errno<'a>( |
| 336 | error: &std::io::Error, |
| 337 | filename: impl Into<OsPathOrFd<'a>>, |
| 338 | vm: &VirtualMachine, |
| 339 | ) -> crate::builtins::PyBaseExceptionRef { |
| 340 | use crate::exceptions::ToOSErrorBuilder; |
| 341 | let builder = error.to_os_error_builder(vm); |
| 342 | #[cfg(windows)] |
| 343 | let builder = builder.without_winerror(); |
| 344 | let builder = builder.filename(filename.into().filename(vm)); |
| 345 | builder.build(vm).upcast() |
| 346 | } |
| 347 | } |
nothing calls this directly
no test coverage detected