(&self, vm: &VirtualMachine)
| 1766 | } |
| 1767 | |
| 1768 | fn close_strict(&self, vm: &VirtualMachine) -> PyResult { |
| 1769 | let mut data = self.lock(vm)?; |
| 1770 | let raw = data.check_init(vm)?; |
| 1771 | if file_closed(raw, vm)? { |
| 1772 | return Ok(vm.ctx.none()); |
| 1773 | } |
| 1774 | let flush_res = data.flush(vm); |
| 1775 | let close_res = vm.call_method(data.raw.as_ref().unwrap(), "close", ()); |
| 1776 | exception_chain(flush_res, close_res) |
| 1777 | } |
| 1778 | |
| 1779 | #[pymethod] |
| 1780 | fn close(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyResult { |
no test coverage detected