From d0660c739a39134fdff8c16db1451f09ddd23356 Mon Sep 17 00:00:00 2001 From: Charlie Boutier Date: Mon, 30 Sep 2024 23:50:03 +0000 Subject: [PATCH] format --- avatar/pandora_client.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/avatar/pandora_client.py b/avatar/pandora_client.py index 8cd9a2e..1f407d3 100644 --- a/avatar/pandora_client.py +++ b/avatar/pandora_client.py @@ -23,8 +23,6 @@ import grpc.aio import logging -import time - from avatar.metrics.interceptors import aio_interceptors from avatar.metrics.interceptors import interceptors from bumble import pandora as bumble_server @@ -120,7 +118,11 @@ async def reset(self) -> None: ) return except grpc.aio.AioRpcError as e: - if e.code() in (grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.DEADLINE_EXCEEDED, grpc.StatusCode.CANCELLED): + if e.code() in ( + grpc.StatusCode.UNAVAILABLE, + grpc.StatusCode.DEADLINE_EXCEEDED, + grpc.StatusCode.CANCELLED, + ): if attempts <= max_attempts: self.log.debug(f'Server unavailable, retry [{attempts}/{max_attempts}].') attempts += 1