app_removelist

This commit is contained in:
Kload 2013-02-25 22:54:28 +01:00
parent d55a809a97
commit 00b19cf1a6
2 changed files with 26 additions and 0 deletions

View file

@ -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

View file

@ -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