Skip to content
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

Remove log warning for known cases of wrong FW strings #539

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion asusrouter/modules/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ def from_string(self, fw_string: Optional[str] = None) -> None:

fw_string = clean_string(fw_string)
if not fw_string:
return
return None

# Special cases for old firmwares and absent data
if fw_string == "__":
return None

pattern = (
r"^(?P<major>[39].?0.?0.?[46])?[_.]?"
Expand Down
1 change: 1 addition & 0 deletions tests/modules/test_firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def test_update_source(self, revision, expected_source):
),
# Additional cases
(".386.7_120", None, 386, 7, 120, False, False),
("__", None, None, None, None, False, False),
# Invalid input
("", None, None, None, None, False, False),
("invalid", None, None, None, None, False, False),
Expand Down