File tree 2 files changed +2
-13
lines changed 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -739,8 +739,8 @@ impl Frame {
739
739
} ;
740
740
let context = match argc {
741
741
0 => vm. get_none ( ) , // We have already got the exception,
742
- _ => match vm. last_exception ( ) {
743
- Some ( exc) => exc. clone ( ) ,
742
+ _ => match vm. pop_exception ( ) {
743
+ Some ( exc) => exc,
744
744
None => vm. get_none ( ) ,
745
745
} ,
746
746
} ;
Original file line number Diff line number Diff line change @@ -931,17 +931,6 @@ impl VirtualMachine {
931
931
pub fn pop_exception ( & self ) -> Option < PyObjectRef > {
932
932
self . exceptions . borrow_mut ( ) . pop ( )
933
933
}
934
-
935
- pub fn last_exception ( & self ) -> Option < Ref < PyObjectRef > > {
936
- let exceptions = self . exceptions . borrow ( ) ;
937
- if exceptions. is_empty ( ) {
938
- None
939
- } else {
940
- Some ( Ref :: map ( self . exceptions . borrow ( ) , |exceptions| {
941
- exceptions. last ( ) . unwrap ( )
942
- } ) )
943
- }
944
- }
945
934
}
946
935
947
936
impl Default for VirtualMachine {
You can’t perform that action at this time.
0 commit comments