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
1 changed files with 3 additions and 0 deletions

View File

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