From 4c006504eaed89044a3bb9037440b2310e9d5157 Mon Sep 17 00:00:00 2001 From: Kris Gesling Date: Thu, 19 Sep 2019 12:39:53 +0930 Subject: [PATCH] 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. --- __init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/__init__.py b/__init__.py index 80ab59c..a472a01 100644 --- a/__init__.py +++ b/__init__.py @@ -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]