Fixed an issue causing a crash of the standalone python shell window. eric7

Mon, 07 Nov 2022 19:07:21 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 07 Nov 2022 19:07:21 +0100
branch
eric7
changeset 9483
1208b0ef8ccb
parent 9482
a2bc06a54d9d
child 9484
d2eb8f0a5bf0

Fixed an issue causing a crash of the standalone python shell window.

src/eric7/Debugger/DebugServer.py file | annotate | diff | comparison | revisions
--- a/src/eric7/Debugger/DebugServer.py	Mon Nov 07 17:19:58 2022 +0100
+++ b/src/eric7/Debugger/DebugServer.py	Mon Nov 07 19:07:21 2022 +0100
@@ -2185,7 +2185,11 @@
         @return string for the project environment
         @rtype str
         """
-        if ericApp().getObject("Project").isOpen():
-            return self.tr("<project>")
-        else:
+        try:
+            if ericApp().getObject("Project").isOpen():
+                return self.tr("<project>")
+            else:
+                return ""
+        except KeyError:
+            # The project object is not present
             return ""

eric ide

mercurial