0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

nixos/test-driver: name exception according to pep8

see https://docs.astral.sh/ruff/rules/error-suffix-on-exception-name/
This commit is contained in:
Jörg Thalheim 2023-09-30 10:23:21 +02:00
parent a1f01abe53
commit 1810265b57

View file

@ -5,7 +5,7 @@ from typing import Callable, Optional
from .logger import rootlog
class PollingConditionFailed(Exception):
class PollingConditionError(Exception):
pass
@ -60,7 +60,7 @@ class PollingCondition:
def maybe_raise(self) -> None:
if not self.check():
raise PollingConditionFailed(self.status_message(False))
raise PollingConditionError(self.status_message(False))
def status_message(self, status: bool) -> str:
return f"Polling condition {'succeeded' if status else 'failed'}: {self.description}"