Skip to content

Commit c644176

Browse files
committed
Modules have attributes, not items.
1 parent 4cb7f02 commit c644176

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

vm/src/stdlib/json.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,7 @@ pub fn de_pyobject(vm: &VirtualMachine, s: &str) -> PyResult {
199199
de.deserialize(&mut serde_json::Deserializer::from_str(s))
200200
.map_err(|err| {
201201
let json_decode_error = vm
202-
.sys_module
203-
.get_item("modules")
202+
.get_attribute(vm.sys_module.clone(), "modules")
204203
.unwrap()
205204
.get_item("json")
206205
.unwrap()

0 commit comments

Comments
 (0)