Skip to content

Commit

Permalink
fix issue causing aarch64 to raise `UnknownPlatformArchitectureErro…
Browse files Browse the repository at this point in the history
…r` (#101)
  • Loading branch information
ITProKyle committed Jul 3, 2024
1 parent 141fab7 commit df5f69d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion f_lib/_system_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def is_64bit(self) -> bool:
@cached_property
def is_arm(self) -> bool:
"""Whether the system is arm based."""
return "arm" in platform.machine().lower()
return platform.machine().lower().startswith(("arm", "aarch"))

@cached_property
def is_frozen(self) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test__system_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_is_64bit(self, expected: bool, maxsize: int, mocker: MockerFixture) ->
assert SystemInfo().is_64bit is expected

@pytest.mark.parametrize(
("expected", "machine"), [(False, "leg"), (True, "arm"), (True, "ARM")]
("expected", "machine"), [(False, "leg"), (True, "arm"), (True, "ARM"), (True, "aarch")]
)
def test_is_arm(self, expected: bool, machine: str, mocker: MockerFixture) -> None:
"""Test is_arm."""
Expand Down

0 comments on commit df5f69d

Please sign in to comment.