mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
app_removelist
This commit is contained in:
parent
d55a809a97
commit
00b19cf1a6
2 changed files with 26 additions and 0 deletions
|
@ -224,6 +224,16 @@ app:
|
|||
listlists:
|
||||
action_help: List fetched lists
|
||||
|
||||
### app_removelist()
|
||||
removelist:
|
||||
action_help: Remove list from the repositories
|
||||
arguments:
|
||||
-n:
|
||||
full: --name
|
||||
help: Name of the list to remove
|
||||
ask: "List to remove"
|
||||
pattern: '^[a-z0-9_]+$'
|
||||
|
||||
### app_list()
|
||||
list:
|
||||
action_help: List apps
|
||||
|
|
|
@ -58,6 +58,22 @@ def app_listlists():
|
|||
return { 'Lists' : list_list }
|
||||
|
||||
|
||||
def app_removelist(name):
|
||||
"""
|
||||
Remove specified application list
|
||||
|
||||
Keyword arguments:
|
||||
name -- Name of the list to remove
|
||||
|
||||
"""
|
||||
try:
|
||||
os.remove(repo_path +'/'+ name + '.json')
|
||||
except OSError:
|
||||
raise YunoHostError(22, _("Unknown list"))
|
||||
|
||||
win_msg(_("List successfully removed"))
|
||||
|
||||
|
||||
def app_list(offset=None, limit=None, filter=None, raw=False):
|
||||
"""
|
||||
List available applications
|
||||
|
|
Loading…
Reference in a new issue