From e268112107df9c5938037ca338b9cf6c83603025 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 8 Sep 2022 21:04:00 +0200 Subject: ayatana-settings: Don't fail if XDG_CURRENT_DESKTOP is not set. Fixes: https://github.com/AyatanaIndicators/ayatana-settings/issues/10 --- ayatana-settings | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- cgit v1.2.3