eric6/DebugClients/Python/DebugBase.py

changeset 8240
93b8a353c4bf
parent 8228
772103b14c18
child 8257
28146736bbfc
diff -r 59a9a658618c -r 93b8a353c4bf eric6/DebugClients/Python/DebugBase.py
--- a/eric6/DebugClients/Python/DebugBase.py	Wed Apr 14 19:38:19 2021 +0200
+++ b/eric6/DebugClients/Python/DebugBase.py	Wed Apr 14 19:59:16 2021 +0200
@@ -15,6 +15,7 @@
 import ctypes
 import time
 import dis
+import contextlib
 
 from BreakpointWatch import Breakpoint, Watch
 
@@ -168,13 +169,11 @@
             cf = cf.f_back
             frmnr -= 1
         
-        try:
+        with contextlib.suppress(Exception):
             if "__pypy__" in sys.builtin_module_names:
                 import __pypy__
                 __pypy__.locals_to_fast(cf)
                 return
-        except Exception:       # secok
-            pass
         
         ctypes.pythonapi.PyFrame_LocalsToFast(
             ctypes.py_object(cf),

eric ide

mercurial