From 096701893d70a9e75cb9839ad37ad50a55f68f2f Mon Sep 17 00:00:00 2001 From: Papoteur Date: Thu, 10 Aug 2017 13:56:07 +0200 Subject: ignore DESKTOP_SESSION when it is void (mga#21454) --- usr/share/mageiawelcome/mageiawelcome.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr/share') diff --git a/usr/share/mageiawelcome/mageiawelcome.py b/usr/share/mageiawelcome/mageiawelcome.py index 4c7263e..5f14890 100644 --- a/usr/share/mageiawelcome/mageiawelcome.py +++ b/usr/share/mageiawelcome/mageiawelcome.py @@ -3,8 +3,6 @@ import signal import os import time -import urllib.request, urllib.parse, urllib.error -import subprocess import subprocess import shlex import gettext @@ -52,7 +50,10 @@ def main(): arch = '32-bit' home = os.getenv("HOME") username = os.getenv("USER") - desktop = get_desktop_name(os.path.basename(os.getenv("DESKTOP_SESSION"))) + if os.getenv("DESKTOP_SESSION") != "" : + desktop = get_desktop_name(os.path.basename(os.getenv("DESKTOP_SESSION"))) + else: + desktop = 'Other' if desktop == 'Other': desktop = get_desktop_name2(os.getenv("XDG_CURRENT_DESKTOP")) -- cgit v1.2.1