src/eric7/DebugClients/Python/DebugVariables.py

branch
eric7
changeset 10045
f5c57f8d17a4
parent 9653
e67609152c5e
child 10060
b946699e9e79
diff -r fd95315b1c26 -r f5c57f8d17a4 src/eric7/DebugClients/Python/DebugVariables.py
--- 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