(
zelf: &Py<Self>,
error: std::io::Error,
vm: &VirtualMachine,
)
| 5643 | )] |
| 5644 | impl FileIO { |
| 5645 | fn io_error( |
| 5646 | zelf: &Py<Self>, |
| 5647 | error: std::io::Error, |
| 5648 | vm: &VirtualMachine, |
| 5649 | ) -> PyBaseExceptionRef { |
| 5650 | let exc = error.to_pyexception(vm); |
| 5651 | if let Ok(name) = zelf.as_object().get_attr("name", vm) { |
| 5652 | exc.as_object() |
| 5653 | .set_attr("filename", name, vm) |
| 5654 | .expect("OSError.filename set must success"); |
| 5655 | } |
| 5656 | exc |
| 5657 | } |
| 5658 | |
| 5659 | #[pygetset] |
| 5660 | fn closed(&self) -> bool { |
no test coverage detected