Skip to content
Snippets Groups Projects
Commit f55df1d2 authored by fleur's avatar fleur
Browse files

untested home problem solution

parent 5a2f65ba
No related branches found
No related tags found
No related merge requests found
......@@ -17,12 +17,13 @@ import utime
App = collections.namedtuple("App", ["name", "path"])
def enumerate_apps():
def get_home_app():
"""List all installed apps."""
for f in os.listdir("/"):
if f == "main.py":
yield App("Home", f)
def enumerate_apps():
for app in sorted(os.listdir("/apps")):
if app.startswith("."):
continue
......@@ -88,7 +89,9 @@ def no_apps_message():
if __name__ == "__main__":
try:
apps = sorted(list(enumerate_apps()), key=lambda b: b.name.lower())
apps = list(get_home_app())
apps += sorted(list(enumerate_apps()), key=lambda b: b.name.lower())
except OSError:
apps = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment