Fixed an issue related to an empty global config override dictionary.

Tue, 16 Mar 2021 17:29:42 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 16 Mar 2021 17:29:42 +0100
changeset 8164
c8b88e73b56f
parent 8163
29fb6d420a25
child 8165
61ca9619decb

Fixed an issue related to an empty global config override dictionary.

eric6/Project/Project.py file | annotate | diff | comparison | revisions
eric6/Sessions/SessionFile.py file | annotate | diff | comparison | revisions
--- a/eric6/Project/Project.py	Mon Mar 15 17:55:48 2021 +0100
+++ b/eric6/Project/Project.py	Tue Mar 16 17:29:42 2021 +0100
@@ -455,7 +455,10 @@
         self.dbgAutoContinue = True
         self.dbgEnableMultiprocess = True
         self.dbgMultiprocessNoDebug = ""
-        self.dbgGlobalConfigOverride = {}
+        self.dbgGlobalConfigOverride = {
+            "enable": False,
+            "redirect": True,
+        }
         
         self.pdata = {
             "DESCRIPTION": "",
--- a/eric6/Sessions/SessionFile.py	Mon Mar 15 17:55:48 2021 +0100
+++ b/eric6/Sessions/SessionFile.py	Tue Mar 16 17:29:42 2021 +0100
@@ -273,12 +273,14 @@
         dbs = e5App().getObject("DebugServer")
         
         # step 1: multi project and project
+        # =================================
         if sessionDict["MultiProject"]:
             multiProject.openMultiProject(sessionDict["MultiProject"], False)
         if sessionDict["Project"]:
             project.openProject(sessionDict["Project"], False)
         
         # step 2: (project) filenames and the active editor
+        # =================================================
         vm.setSplitOrientation(sessionDict["ViewManagerSplits"]["Orientation"])
         vm.setSplitCount(sessionDict["ViewManagerSplits"]["Count"])
         
@@ -306,15 +308,26 @@
                     ed.setCursorPosition(*editorDict["Cursor"])
         
         # step 3: breakpoints
+        # ===================
         bpModel = dbs.getBreakPointModel()
         bpModel.addBreakPoints(sessionDict["Breakpoints"])
         
         # step 4: watch expressions
+        # =========================
         wpModel = dbs.getWatchPointModel()
         wpModel.addWatchPoints(sessionDict["Watchpoints"])
         
         # step 5: debug info
+        # ==================
         debugInfoDict = sessionDict["DebugInfo"]
+        
+        # adjust for newer session types
+        if "GlobalConfigOverride" not in debugInfoDict:
+            debugInfoDict["GlobalConfigOverride"] = {
+                "enable": False,
+                "redirect": True,
+            }
+        
         dbg.lastUsedVenvName = debugInfoDict["VirtualEnv"]
         dbg.setArgvHistory(debugInfoDict["CommandLine"])
         dbg.setWdHistory(debugInfoDict["WorkingDirectory"])
@@ -347,6 +360,7 @@
             )
         
         # step 6: bookmarks
+        # =================
         for bookmark in sessionDict["Bookmarks"]:
             editor = vm.getOpenEditor(bookmark["Filename"])
             if editor is not None:
@@ -354,12 +368,14 @@
                     editor.toggleBookmark(lineno)
         
         # step 7: state of the various project browsers
+        # =============================================
         for browserState in sessionDict["ProjectBrowserStates"]:
             browser = projectBrowser.getProjectBrowser(browserState["Name"])
             if browser is not None:
                 browser.expandItemsByName(browserState["ExpandedItems"])
         
         # step 8: active window
+        # =====================
         if sessionDict["ActiveWindow"]:
             vm.openFiles(sessionDict["ActiveWindow"]["Filename"])
             ed = vm.getOpenEditor(sessionDict["ActiveWindow"]["Filename"])

eric ide

mercurial