kopia lustrzana https://github.com/piku/piku
Show a message when no apps installed
I think it is better to say that there is no app in the system instead of returning nothingpull/147/head
rodzic
68351f56b8
commit
ebeeb6824b
8
piku.py
8
piku.py
|
@ -1017,10 +1017,14 @@ def cleanup(ctx):
|
|||
# --- User commands ---
|
||||
|
||||
@piku.command("apps")
|
||||
def list_apps():
|
||||
def cmd_apps():
|
||||
"""List apps, e.g.: piku apps"""
|
||||
apps = listdir(APP_ROOT)
|
||||
if not apps:
|
||||
echo("There is no application yet.")
|
||||
return
|
||||
|
||||
for a in listdir(APP_ROOT):
|
||||
for a in apps:
|
||||
running = len(glob(join(UWSGI_ENABLED, '{}*.ini'.format(a)))) != 0
|
||||
echo(('*' if running else ' ') + a, fg='green')
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue