Fix Flake8 reported errors (E275) 69/9069/1
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Fri, 23 Sep 2022 10:39:02 +0000 (13:39 +0300)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Fri, 23 Sep 2022 10:39:02 +0000 (13:39 +0300)
Fix Flake8 reported issues about 'Missing whitespace after
keyword (E275)'.

Issue-Id: RIC-940

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I60e16f9fc3ca54506ccfcab8e8851dadebf2140f

ricsdl-package/ricsdl/backend/redis.py

index 822afcf..d7139fb 100755 (executable)
@@ -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)}'