Add mode argument to os.open

This commit is contained in:
Aviv Palivoda
2019-06-15 17:02:46 +03:00
parent 82f83ef345
commit 92ad30ef6a

View File

@@ -103,7 +103,10 @@ pub fn os_open(vm: &VirtualMachine, args: PyFuncArgs) -> PyResult {
(name, Some(vm.ctx.str_type())),
(flags, Some(vm.ctx.int_type()))
],
optional = [(dir_fd, Some(vm.ctx.int_type()))]
optional = [
(_mode, Some(vm.ctx.int_type())),
(dir_fd, Some(vm.ctx.int_type()))
]
);
let name = name.clone().downcast::<PyString>().unwrap();