From: Thoralf Czichy Date: Fri, 2 Dec 2022 13:29:32 +0000 (+0000) Subject: Merge "Replacing committers with new ones" X-Git-Tag: 3.1.2~2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=fbba612bfd6e48ba96abbecffa65c9a7ff28056c;hp=53d774224fbb51231a0ebc2bab25d3f187989e84;p=ric-plt%2Fsdlpy.git Merge "Replacing committers with new ones" --- diff --git a/ricsdl-package/ricsdl/backend/redis.py b/ricsdl-package/ricsdl/backend/redis.py index 822afcf..d7139fb 100755 --- a/ricsdl-package/ricsdl/backend/redis.py +++ b/ricsdl-package/ricsdl/backend/redis.py @@ -45,13 +45,13 @@ def _map_to_sdl_exception(): """Translates known redis exceptions into SDL exceptions.""" try: yield - except(redis_exceptions.ResponseError) as exc: + except redis_exceptions.ResponseError as exc: raise RejectedByBackend("SDL backend rejected the request: {}". format(str(exc))) from exc - except(redis_exceptions.ConnectionError, redis_exceptions.TimeoutError) as exc: + except (redis_exceptions.ConnectionError, redis_exceptions.TimeoutError) as exc: raise NotConnected("SDL not connected to backend: {}". format(str(exc))) from exc - except(redis_exceptions.RedisError) as exc: + except redis_exceptions.RedisError as exc: raise BackendError("SDL backend failed to process the request: {}". format(str(exc))) from exc @@ -588,5 +588,5 @@ class RedisBackendLock(DbBackendLockAbc): return 'locked' return 'locked by someone else' return 'unlocked' - except(redis_exceptions.RedisError) as exc: + except redis_exceptions.RedisError as exc: return f'Error: {str(exc)}'