(vm: &VirtualMachine)
| 2634 | |
| 2635 | #[pyfunction] |
| 2636 | fn gethostname(vm: &VirtualMachine) -> PyResult<PyStrRef> { |
| 2637 | gethostname::gethostname() |
| 2638 | .into_string() |
| 2639 | .map(|hostname| vm.ctx.new_str(hostname)) |
| 2640 | .map_err(|err| vm.new_os_error(err.into_string().unwrap())) |
| 2641 | } |
| 2642 | |
| 2643 | #[cfg(all(unix, not(target_os = "redox")))] |
| 2644 | #[pyfunction] |
nothing calls this directly
no test coverage detected