From bc4a4bcd33dc82a24f78ddb7568d43554e027052 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 10 Jun 2025 15:01:18 -0700 Subject: [PATCH] fix codeql warning --- notifications_python_client/base.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/notifications_python_client/base.py b/notifications_python_client/base.py index 946dea209..1a6bf15bc 100644 --- a/notifications_python_client/base.py +++ b/notifications_python_client/base.py @@ -1,6 +1,5 @@ import json import logging -import time import urllib.parse import requests @@ -94,7 +93,7 @@ class BaseAPIClient: raise TypeError def _perform_request(self, method, url, kwargs): - start_time = time.monotonic() + try: response = self.request_session.request(method, url, **kwargs) response.raise_for_status() @@ -109,11 +108,6 @@ class BaseAPIClient: api_error.message, ) raise api_error from e - finally: - elapsed_time = time.monotonic() - start_time - logger.debug( - "API %s request on %s finished in %s", method, url, elapsed_time - ) def _process_json_response(self, response): try: