File tree 1 file changed +3
-1
lines changed 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use std::collections::HashSet;
7
7
use std:: fs:: File ;
8
8
use std:: io:: prelude:: * ;
9
9
use std:: io:: BufReader ;
10
+ use std:: path:: PathBuf ;
10
11
11
12
//3rd party imports
12
13
use num_bigint:: ToBigInt ;
@@ -23,6 +24,7 @@ use crate::pyobject::{
23
24
PyResult , TypeProtocol ,
24
25
} ;
25
26
27
+ use crate :: import;
26
28
use crate :: vm:: VirtualMachine ;
27
29
28
30
fn compute_c_flag ( mode : & str ) -> u16 {
@@ -267,7 +269,7 @@ pub fn io_open(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
267
269
optional = [ ( mode, Some ( vm. ctx. str_type( ) ) ) ]
268
270
) ;
269
271
270
- let module = mk_module ( & vm . ctx ) ;
272
+ let module = import :: import_module ( vm , PathBuf :: default ( ) , "io" ) . unwrap ( ) ;
271
273
272
274
//mode is optional: 'rt' is the default mode (open from reading text)
273
275
let rust_mode = mode. map_or ( "rt" . to_string ( ) , |m| objstr:: get_value ( m) ) ;
You can’t perform that action at this time.
0 commit comments