style: linting

This commit is contained in:
Inex Code 2023-08-25 19:28:37 +03:00
parent ada89a2494
commit 9db717c774

View file

@ -290,8 +290,10 @@ class StoppedService:
lambda: self.service.get_status() == ServiceStatus.INACTIVE, lambda: self.service.get_status() == ServiceStatus.INACTIVE,
timeout_sec=DEFAULT_START_STOP_TIMEOUT, timeout_sec=DEFAULT_START_STOP_TIMEOUT,
) )
except TimeoutError as e: except TimeoutError as error:
raise TimeoutError(f"timed out waiting for {self.service.get_display_name()} to stop") raise TimeoutError(
f"timed out waiting for {self.service.get_display_name()} to stop"
) from error
return self.service return self.service
def __exit__(self, type, value, traceback): def __exit__(self, type, value, traceback):
@ -302,5 +304,7 @@ class StoppedService:
lambda: self.service.get_status() == ServiceStatus.ACTIVE, lambda: self.service.get_status() == ServiceStatus.ACTIVE,
timeout_sec=DEFAULT_START_STOP_TIMEOUT, timeout_sec=DEFAULT_START_STOP_TIMEOUT,
) )
except TimeoutError as e: except TimeoutError as error:
raise TimeoutError(f"timed out waiting for {self.service.get_display_name()} to start") raise TimeoutError(
f"timed out waiting for {self.service.get_display_name()} to start"
) from error