Skip apps with no name

If app.get_name() returns None, the Skill can't handle the app so should just skip it.
Most likely caused by an empty or malformed desktop entry.
This commit is contained in:
Kris Gesling 2019-09-19 12:39:53 +09:30 committed by GitHub
parent 42b819f9a2
commit 4c006504ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,6 +41,9 @@ class DesktopLauncherSkill(MycroftSkill):
for app in gio.app_info_get_all(): for app in gio.app_info_get_all():
name = app.get_name().lower() name = app.get_name().lower()
if name == None:
# Likely an empty .desktop entry, skip it
continue
entry = [app] entry = [app]
tokenized_name = tokenizer.tokenize(name)[0] tokenized_name = tokenizer.tokenize(name)[0]