From 8cf92576831e7a130564576f79c73cc4fbcd08ca Mon Sep 17 00:00:00 2001 From: cyxae Date: Tue, 13 Jul 2021 19:35:20 +0200 Subject: [PATCH] fix yunohost app search fail --- src/yunohost/app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 5f001c12a..2ca931a90 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -127,14 +127,15 @@ def app_search(string): catalog_of_apps = app_catalog() # Selecting apps according to a match in app name or description + matching_apps = {"apps": {}} for app in catalog_of_apps["apps"].items(): - if not ( + if ( re.search(string, app[0], flags=re.IGNORECASE) or re.search(string, app[1]["description"], flags=re.IGNORECASE) ): - del catalog_of_apps["apps"][app[0]] + matching_apps["apps"][app[0]] = app[1] - return catalog_of_apps + return matching_apps # Old legacy function...