aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-09-08 21:04:00 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-09-08 21:04:42 +0200
commite268112107df9c5938037ca338b9cf6c83603025 (patch)
tree2e32940c6e2894e5ea95844760828d708c6fad64
parent4f23916d57d00fb5ad6a409c50ee85c6bc64f1d5 (diff)
downloadayatana-settings-e268112107df9c5938037ca338b9cf6c83603025.tar.gz
ayatana-settings-e268112107df9c5938037ca338b9cf6c83603025.tar.bz2
ayatana-settings-e268112107df9c5938037ca338b9cf6c83603025.zip
ayatana-settings: Don't fail if XDG_CURRENT_DESKTOP is not set.
Fixes: https://github.com/AyatanaIndicators/ayatana-settings/issues/10
-rwxr-xr-xayatana-settings5
1 files changed, 4 insertions, 1 deletions
diff --git a/ayatana-settings b/ayatana-settings
index a8ea538..7daae0a 100755
--- a/ayatana-settings
+++ b/ayatana-settings
@@ -48,7 +48,10 @@ class AyatanaSettings:
self.bSystemd = isSystemd()
self.bInit = False
- self.sDesktop = os.environ['XDG_CURRENT_DESKTOP']
+ try:
+ self.sDesktop = os.environ['XDG_CURRENT_DESKTOP']
+ except KeyError:
+ self.sDesktop = ""
# Session
if Gio.SettingsSchemaSource.get_default().lookup('org.ayatana.indicator.session', False):