Skip to content
Snippets Groups Projects

check if the field bin is existing in the metadata, and use it as exec

Merged Kloenk requested to merge kloenk/firmware:master into master
1 file
+ 7
2
Compare changes
  • Side-by-side
  • Inline
+ 7
2
@@ -36,7 +36,7 @@ def read_metadata(app_folder):
return {
"author": "",
"name": app_folder,
"descriptionr": "",
"description": "",
"category": "",
"revision": 0,
}
@@ -70,7 +70,12 @@ def list_apps():
# with or without metadata.json
for appFolder in dirlist:
if not (appFolder.endswith(".py") or appFolder.endswith(".elf")):
apps.append(["/apps/%s/__init__.py" % appFolder, read_metadata(appFolder)])
metadata = read_metadata(appFolder)
if not metadata.get("bin", None):
fileName = "/apps/%s/__init__.py" % appFolder
else:
fileName = "/apps/%s/%s" % (appFolder, metadata["bin"])
apps.append([fileName, metadata])
# list simple python scripts
for pyFile in dirlist:
Loading