eric6/DebugClients/Python/DebugClientBase.py

branch
maintenance
changeset 8450
be7369a19dc9
parent 8400
b3eefd7e58d1
parent 8434
a105f31ba10f
child 8576
fe1957c69854
--- a/eric6/DebugClients/Python/DebugClientBase.py	Thu Jun 03 11:39:55 2021 +0200
+++ b/eric6/DebugClients/Python/DebugClientBase.py	Sat Jul 03 11:47:24 2021 +0200
@@ -1594,7 +1594,7 @@
                     varlist = self.__formatVariablesList(
                         varDict, scope, filterList)
                 else:
-                    # Gently handle exception which could occure as special
+                    # Gently handle exception which could occur as special
                     # cases, e.g. already deleted C++ objects, str conversion..
                     try:
                         varlist = self.__formatQtVariable(variable, typeName)
@@ -1881,8 +1881,11 @@
                         rvalue = "{0:d}|{1}".format(
                             len(value), value.typecode)
                     elif valtype == 'collections.defaultdict':
-                        rvalue = "{0:d}|{1}".format(
-                            len(value), value.default_factory.__name__)
+                        if value.default_factory is None:
+                            factoryName = "None"
+                        else:
+                            factoryName = value.default_factory.__name__
+                        rvalue = "{0:d}|{1}".format(len(value), factoryName)
                     elif valtype == "numpy.ndarray":
                         rvalue = "x".join(str(x) for x in value.shape)
                     elif valtypename == "MultiValueDict":

eric ide

mercurial