MCPcopy Index your code
hub / github.com/RustPython/RustPython / os_error_from_windows_code

Function os_error_from_windows_code

crates/vm/src/stdlib/winreg.rs:40–46  ·  view source on GitHub ↗
(
        vm: &VirtualMachine,
        code: i32,
    )

Source from the content-addressed store, hash-verified

38 }
39
40 fn os_error_from_windows_code(
41 vm: &VirtualMachine,
42 code: i32,
43 ) -> crate::PyRef<crate::builtins::PyBaseException> {
44 use crate::convert::ToPyException;
45 std::io::Error::from_raw_os_error(code).to_pyexception(vm)
46 }
47
48 /// Wrapper type for HKEY that can be created from PyHkey or int
49 struct HKEYArg(Registry::HKEY);

Callers 6

EnumKeyFunction · 0.85
OpenKeyFunction · 0.85
QueryValueFunction · 0.85
QueryValueExFunction · 0.85
SetValueFunction · 0.85
SetValueExFunction · 0.85

Calls 1

to_pyexceptionMethod · 0.45

Tested by

no test coverage detected