Skip to content

Commit

Permalink
Remove log warning for known cases of wrong FW strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaskivskyi committed Sep 14, 2024
1 parent 4d6b5c8 commit 0449b42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 0449b42

Please sign in to comment.