-
-
Notifications
You must be signed in to change notification settings - Fork 38
Use device-reported repo for firmware releases and upgrades #2049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
cceb573
1471229
85a5673
d6896c4
eec1a6c
8f36752
97b9a71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -654,6 +654,12 @@ async def upgrade( # noqa: PLR0912 | |
| msg = "Device already running the requested version" | ||
| raise WLEDUpgradeError(msg) | ||
|
|
||
| # Prefer the repo reported by the device itself only when the caller | ||
| # did not override the default repository. Older firmware that does not | ||
| # include the field will already have fallen back to DEFAULT_REPO. | ||
| if repo == DEFAULT_REPO: | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has a side effect, if the default repo was actually meant to be set, it wouldn't work. We probably need to use a sentinel to make this more robust. |
||
| repo = self._device.info.repo | ||
|
|
||
| # Determine if this is an Ethernet board | ||
| ethernet = "" | ||
| if ( | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| """Constants for tests.""" | ||
|
|
||
| from wled.const import DEFAULT_REPO | ||
|
|
||
| __all__ = ["DEFAULT_REPO"] | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not make much sense. Instead just import directly |
||
Uh oh!
There was an error while loading. Please reload this page.