DebugClients/Python3/DebugClientBase.py

changeset 2486
e16c9ced6ae5
parent 2376
a0409e65bd81
child 2636
f3dd3c8d4aa4
--- a/DebugClients/Python3/DebugClientBase.py	Mon Mar 11 19:00:54 2013 +0100
+++ b/DebugClients/Python3/DebugClientBase.py	Wed Mar 13 18:35:24 2013 +0100
@@ -1517,12 +1517,15 @@
             varlist.extend(vlist)
         
             if obj is not None and not formatSequences:
-                if repr(obj).startswith('{'):
-                    varlist.append(('...', 'dict', "{0:d}".format(len(obj.keys()))))
-                elif repr(obj).startswith('['):
-                    varlist.append(('...', 'list', "{0:d}".format(len(obj))))
-                elif repr(obj).startswith('('):
-                    varlist.append(('...', 'tuple', "{0:d}".format(len(obj))))
+                try:
+                    if repr(obj).startswith('{'):
+                        varlist.append(('...', 'dict', "{0:d}".format(len(obj.keys()))))
+                    elif repr(obj).startswith('['):
+                        varlist.append(('...', 'list', "{0:d}".format(len(obj))))
+                    elif repr(obj).startswith('('):
+                        varlist.append(('...', 'tuple', "{0:d}".format(len(obj))))
+                except:
+                    pass
         
         self.write('{0}{1}\n'.format(DebugProtocol.ResponseVariable, str(varlist)))
         

eric ide

mercurial