eric7/DebugClients/Python/DebugClientBase.py

branch
eric7
changeset 8433
91d5ffe55839
parent 8416
1b8e456475a1
child 8444
88b242eba71b
diff -r 074407b4c107 -r 91d5ffe55839 eric7/DebugClients/Python/DebugClientBase.py
--- a/eric7/DebugClients/Python/DebugClientBase.py	Sat Jun 19 12:17:17 2021 +0200
+++ b/eric7/DebugClients/Python/DebugClientBase.py	Sat Jun 19 16:22:11 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