Skip to content
This repository was archived by the owner on Apr 2, 2020. It is now read-only.

Commit aa10e9b

Browse files
committed
Fix traceback printing bug.
1 parent f587221 commit aa10e9b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

vm/src/frame.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ impl Frame {
123123
&exception,
124124
&vm.ctx.exceptions.base_exception_type
125125
));
126-
let traceback = vm
127-
.get_method(exception.clone(), &"__traceback__".to_string())
128-
.unwrap();
126+
let traceback_name = vm.new_str("__traceback__".to_string());
127+
let traceback = vm.get_attribute(exception.clone(), traceback_name).unwrap();
129128
trace!("Adding to traceback: {:?} {:?}", traceback, lineno);
130129
let pos = vm.ctx.new_tuple(vec![
131130
vm.ctx.new_str(filename.clone()),

0 commit comments

Comments
 (0)