mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Use vm.import when running with -m
This commit is contained in:
1 parent
72febb77d0
commit
ee4ee5456f
1 file changed
+1
-2
+1
-2
@@ -98,8 +98,7 @@ fn run_command(vm: &VirtualMachine, mut source: String) -> PyResult {
|
||||
|
||||
fn run_module(vm: &VirtualMachine, module: &str) -> PyResult {
|
||||
debug!("Running module {}", module);
|
||||
let current_path = PathBuf::from(".");
|
||||
import::import_module(vm, current_path, module)
|
||||
vm.import(module, &vm.ctx.new_tuple(vec![]), 0)
|
||||
}
|
||||
|
||||
fn run_script(vm: &VirtualMachine, script_file: &str) -> PyResult {
|
||||
|
||||
Reference in new issue
Block a user