Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flow3r
flow3r firmware
Commits
41920e6f
Commit
41920e6f
authored
1 year ago
by
schneider
Browse files
Options
Downloads
Patches
Plain Diff
apps: offer a way to get the bundle path
parent
dd6ad21c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!164
apps: offer a way to get the bundle path
Pipeline
#6889
passed
1 year ago
Stage: check
Stage: build
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_payload/st3m/application.py
+11
-4
11 additions, 4 deletions
python_payload/st3m/application.py
with
11 additions
and
4 deletions
python_payload/st3m/application.py
+
11
−
4
View file @
41920e6f
...
...
@@ -20,13 +20,20 @@ log = Log(__name__)
class
ApplicationContext
:
"""
Container for
future
application context.
Container for application context.
E
nvisioned are: path to
the bundle,
bundle data,
Further e
nvisioned are: path to bundle data,
path to a data directory, etc...
"""
pass
_bundle_path
:
str
def
__init__
(
self
,
bundle_path
:
str
=
""
)
->
None
:
self
.
_bundle_path
=
bundle_path
@property
def
bundle_path
(
self
)
->
str
:
return
self
.
_bundle_path
class
Application
(
BaseView
):
...
...
@@ -152,7 +159,7 @@ class BundleMetadata:
log
.
info
(
f
"
Loaded
{
self
.
name
}
module:
{
m
}
"
)
klass
=
getattr
(
m
,
class_entry
)
log
.
info
(
f
"
Loaded
{
self
.
name
}
class:
{
klass
}
"
)
inst
=
klass
(
ApplicationContext
())
inst
=
klass
(
ApplicationContext
(
self
.
path
))
log
.
info
(
f
"
Instantiated
{
self
.
name
}
class:
{
inst
}
"
)
return
inst
# type: ignore
except
Exception
as
e
:
...
...
This diff is collapsed.
Click to expand it.
q3k
@q3k
mentioned in issue
#37 (closed)
·
1 year ago
mentioned in issue
#37 (closed)
mentioned in issue #37
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment