From ae2c81ff388d9b06bc11ac1e14bd5d71b4f4637c Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 26 Apr 2015 01:20:49 +0300 Subject: vm: On exiting except block, clear sys.exc_info() value. This doesn't handle case fo enclosed except blocks, but once again, sys.exc_info() support is a workaround for software which uses it instead of properly catching exceptions via variable in except clause. --- tests/misc/sys_exc_info.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/misc/sys_exc_info.py') diff --git a/tests/misc/sys_exc_info.py b/tests/misc/sys_exc_info.py index 1aad6f1898..de5b825624 100644 --- a/tests/misc/sys_exc_info.py +++ b/tests/misc/sys_exc_info.py @@ -14,9 +14,8 @@ except: print(sys.exc_info()[0:2]) f() -# MicroPython currently doesn't reset sys.exc_info() value -# on exit from "except" block. -#f() +# Outside except block, sys.exc_info() should be back to None's +f() -# Recursive except blocks are not handled either - just don't -# use exc_info() at all! +# Recursive except blocks are not handled - just don't +# use exc_info() at all, use explicit variables in "except". -- cgit v1.2.3