Globals: fixed an issue causing an exception when some environment variables are not defined.

Sun, 21 Feb 2021 12:28:58 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 21 Feb 2021 12:28:58 +0100
changeset 8126
e7278bf7168f
parent 8125
9e789fa8f38e
child 8127
9534be896b85

Globals: fixed an issue causing an exception when some environment variables are not defined.

eric6/Globals/__init__.py file | annotate | diff | comparison | revisions
diff -r 9e789fa8f38e -r e7278bf7168f eric6/Globals/__init__.py
--- a/eric6/Globals/__init__.py	Sat Feb 20 14:53:33 2021 +0100
+++ b/eric6/Globals/__init__.py	Sun Feb 21 12:28:58 2021 +0100
@@ -164,7 +164,7 @@
     if not isLinuxPlatform():
         return ""
     
-    sessionType = os.environ.get("XDG_SESSION_TYPE").lower()
+    sessionType = os.environ.get("XDG_SESSION_TYPE", "").lower()
     if "x11" in sessionType:
         return "X11"
     elif "wayland" in sessionType:

eric ide

mercurial