Method
__exit__
(
&self,
cls: PyObjectRef,
exc: PyObjectRef,
tb: PyObjectRef,
vm: &VirtualMachine,
)
Source from the content-addressed store, hash-verified
| 1469 | |
| 1470 | #[pymethod] |
| 1471 | fn __exit__( |
| 1472 | &self, |
| 1473 | cls: PyObjectRef, |
| 1474 | exc: PyObjectRef, |
| 1475 | tb: PyObjectRef, |
| 1476 | vm: &VirtualMachine, |
| 1477 | ) -> PyResult<()> { |
| 1478 | if vm.is_none(&cls) && vm.is_none(&exc) && vm.is_none(&tb) { |
| 1479 | self.commit(vm) |
| 1480 | } else { |
| 1481 | self.rollback(vm) |
| 1482 | } |
| 1483 | } |
| 1484 | |
| 1485 | #[pygetset] |
| 1486 | fn isolation_level(&self) -> Option<PyStrRef> { |
Callers
nothing calls this directly
Tested by
no test coverage detected