diff --git a/src/ahriman/models/repository_id.py b/src/ahriman/models/repository_id.py index 08ebd69a..bd06d5eb 100644 --- a/src/ahriman/models/repository_id.py +++ b/src/ahriman/models/repository_id.py @@ -94,7 +94,7 @@ class RepositoryId: TypeError: if other is different from RepositoryId type """ if not isinstance(other, RepositoryId): - raise ValueError(f"'<' not supported between instances of '{type(self)}' and '{type(other)}'") + raise TypeError(f"'<' not supported between instances of '{type(self)}' and '{type(other)}'") return (self.name, self.architecture) < (other.name, other.architecture) diff --git a/tests/ahriman/models/test_repository_id.py b/tests/ahriman/models/test_repository_id.py index 9bd21559..5e8d8983 100644 --- a/tests/ahriman/models/test_repository_id.py +++ b/tests/ahriman/models/test_repository_id.py @@ -64,9 +64,9 @@ def test_lt() -> None: def test_lt_invalid() -> None: """ - must raise ValueError if other is not valid repository id + must raise TypeError if other is not valid repository id """ - with pytest.raises(ValueError): + with pytest.raises(TypeError): assert RepositoryId("x86_64", "a") < 42