From 9db717c774ff2ddb22d81aad6930caebf53c4c83 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 25 Aug 2023 19:28:37 +0300 Subject: [PATCH] style: linting --- selfprivacy_api/services/service.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/selfprivacy_api/services/service.py b/selfprivacy_api/services/service.py index 0f018b6..b66bd19 100644 --- a/selfprivacy_api/services/service.py +++ b/selfprivacy_api/services/service.py @@ -290,8 +290,10 @@ class StoppedService: lambda: self.service.get_status() == ServiceStatus.INACTIVE, timeout_sec=DEFAULT_START_STOP_TIMEOUT, ) - except TimeoutError as e: - raise TimeoutError(f"timed out waiting for {self.service.get_display_name()} to stop") + except TimeoutError as error: + raise TimeoutError( + f"timed out waiting for {self.service.get_display_name()} to stop" + ) from error return self.service def __exit__(self, type, value, traceback): @@ -302,5 +304,7 @@ class StoppedService: lambda: self.service.get_status() == ServiceStatus.ACTIVE, timeout_sec=DEFAULT_START_STOP_TIMEOUT, ) - except TimeoutError as e: - raise TimeoutError(f"timed out waiting for {self.service.get_display_name()} to start") + except TimeoutError as error: + raise TimeoutError( + f"timed out waiting for {self.service.get_display_name()} to start" + ) from error