def detect_desktop_environment():
        """Checks for known desktop environments

        Return the desktop environments name, lowercase (kde, gnome, xfce)
        or "generic"
        """
        desktop_environment = 'generic'

        if os.environ.get('KDE_FULL_SESSION') == 'true':
            desktop_environment = 'kde'
        elif os.environ.get('GNOME_DESKTOP_SESSION_ID'):
            desktop_environment = 'gnome'
        else:
            try:
                info = commands.getoutput('xprop -root _DT_SAVE_MODE')
                if info in ' = "xfce4"':
                    desktop_environment = 'xfce'
            except (OSError, RuntimeError):
                pass

        return desktop_environment
dataset/ETHPy150Open Xion/SublimeScold/scold/system.py/detect_desktop_environment/swapped operands of `in`