mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
fix yunohost app search fail
This commit is contained in:
parent
fab248ce8c
commit
8cf9257683
1 changed files with 4 additions and 3 deletions
|
@ -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...
|
||||
|
|
Loading…
Add table
Reference in a new issue