Use vm.import when running with -m

This commit is contained in:
Aviv Palivoda committed 2019-07-04 17:32:17 +03:00
1 parent 72febb77d0
commit ee4ee5456f
1 file changed
+1 -2
+1 -2
View File
@@ -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 {