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
"""Translates known redis exceptions into SDL exceptions."""
try:
yield
"""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
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
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
raise BackendError("SDL backend failed to process the request: {}".
format(str(exc))) from exc
return 'locked'
return 'locked by someone else'
return 'unlocked'
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)}'
return f'Error: {str(exc)}'