diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-09-08 21:04:00 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-09-08 21:04:42 +0200 |
commit | e268112107df9c5938037ca338b9cf6c83603025 (patch) | |
tree | 2e32940c6e2894e5ea95844760828d708c6fad64 | |
parent | 4f23916d57d00fb5ad6a409c50ee85c6bc64f1d5 (diff) | |
download | ayatana-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-x | ayatana-settings | 5 |
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): |