1
0
Fork 0
mirror of https://github.com/kbumsik/VirtScreen.git synced 2025-03-09 15:40:18 +00:00

Added os.environ.get calls to prevent the assumption that the environment variables are set, which causes a KeyError.

This commit is contained in:
Luke Anderson 2018-11-04 01:44:40 +01:00
parent f62fa66f51
commit 4a3a8e8e16
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@ class Backend(QObject):
else:
value["available"] = False
# Default Display settings app for a Desktop Environment
desktop_environ = os.environ['XDG_CURRENT_DESKTOP'].lower()
desktop_environ = os.environ.get('XDG_CURRENT_DESKTOP', '').lower()
for key, value in data['displaySettingApps'].items():
for de in value['XDG_CURRENT_DESKTOP']:
if de in desktop_environ: