Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
d9b904fc
Commit
d9b904fc
authored
Dec 29, 2019
by
Rahix
Browse files
Merge 'Display apps without metadata.json'
See merge request
card10/firmware!364
parents
ead70852
53419ff7
Changes
1
Hide whitespace changes
Inline
Side-by-side
preload/menu.py
View file @
d9b904fc
...
...
@@ -55,8 +55,15 @@ def enumerate_apps(apps=None):
info
[
"name"
],
"/apps/{}/{}"
.
format
(
app
,
info
.
get
(
"bin"
,
"__init__.py"
))
)
except
Exception
as
e
:
print
(
"
Could not load /apps/{}/metadata.json!
"
.
format
(
app
))
print
(
"
'{}': metadata.json is invalid ... hoping for the best.
"
.
format
(
app
))
sys
.
print_exception
(
e
)
pyfile
=
"/apps/{}/__init__.py"
.
format
(
app
)
try
:
open
(
pyfile
).
close
()
yield
App
(
app
,
pyfile
)
except
OSError
:
print
(
pyfile
,
"does not even exist :("
)
pass
def
usb_mode
(
disp
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment