DebugClients/Python/DebugClientBase.py

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

eric ide

mercurial