(
&self,
Fildes(fd): Fildes,
eventmask: EventMask,
vm: &VirtualMachine,
)
| 465 | |
| 466 | #[pymethod] |
| 467 | fn modify( |
| 468 | &self, |
| 469 | Fildes(fd): Fildes, |
| 470 | eventmask: EventMask, |
| 471 | vm: &VirtualMachine, |
| 472 | ) -> PyResult<()> { |
| 473 | let mut fds = self.fds.lock(); |
| 474 | // CPython raises KeyError if fd is not registered, match that behavior |
| 475 | let pfd = get_fd_mut(&mut fds, fd) |
| 476 | .ok_or_else(|| vm.new_key_error(vm.ctx.new_int(fd).into()))?; |
| 477 | pfd.events = eventmask.0; |
| 478 | Ok(()) |
| 479 | } |
| 480 | |
| 481 | #[pymethod] |
| 482 | fn unregister(&self, Fildes(fd): Fildes, vm: &VirtualMachine) -> PyResult<()> { |
nothing calls this directly
no test coverage detected