Fixed an issue in the Python debugger caused by a @property method raising an exception (see issue 503). eric7

Sat, 20 May 2023 19:50:13 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 20 May 2023 19:50:13 +0200
branch
eric7
changeset 10045
f5c57f8d17a4
parent 10044
fd95315b1c26
child 10046
35b27af462ef

Fixed an issue in the Python debugger caused by a @property method raising an exception (see issue 503).

src/eric7/DebugClients/Python/DebugVariables.py file | annotate | diff | comparison | revisions
--- a/src/eric7/DebugClients/Python/DebugVariables.py	Sat May 20 17:57:34 2023 +0200
+++ b/src/eric7/DebugClients/Python/DebugVariables.py	Sat May 20 19:50:13 2023 +0200
@@ -52,9 +52,11 @@
         """
         d = []
         for name in dir(var):
-            with contextlib.suppress(AttributeError):
+            try:
                 attribute = getattr(var, name)
-                d.append((name, attribute))
+            except Exception:
+                continue
+            d.append((name, attribute))
 
         return d
 
@@ -81,9 +83,11 @@
         """
         d = []
         for name in dir(var):
-            with contextlib.suppress(AttributeError):
+            try:
                 attribute = getattr(var, name)
-                d.append((name, attribute))
+            except Exception:
+                continue
+            d.append((name, attribute))
 
         yield -1, d
         while True:

eric ide

mercurial