@@ -48,22 +48,16 @@ def make_connection_params(self, url):
4848
4949 socket_timeout = self .options .get ("SOCKET_TIMEOUT" , None )
5050 if socket_timeout :
51- if not isinstance (
52- socket_timeout , (int , float )
53- ):
51+ if not isinstance (socket_timeout , (int , float )):
5452 error_message = "Socket timeout should be float or integer"
5553 raise ImproperlyConfigured (error_message )
5654 kwargs ["socket_timeout" ] = socket_timeout
5755
5856 socket_connect_timeout = self .options .get ("SOCKET_CONNECT_TIMEOUT" , None )
5957 if socket_connect_timeout :
60- if not isinstance (
61- socket_connect_timeout , (int , float )
62- ):
58+ if not isinstance (socket_connect_timeout , (int , float )):
6359 error_message = "Socket connect timeout should be float or integer"
64- raise ImproperlyConfigured (
65- error_message
66- )
60+ raise ImproperlyConfigured (error_message )
6761 kwargs ["socket_connect_timeout" ] = socket_connect_timeout
6862
6963 return kwargs
@@ -147,9 +141,7 @@ def __init__(self, options):
147141 sentinels = options .get ("SENTINELS" )
148142 if not sentinels :
149143 error_message = "SENTINELS must be provided as a list of (host, port)."
150- raise ImproperlyConfigured (
151- error_message
152- )
144+ raise ImproperlyConfigured (error_message )
153145
154146 # provide the connection pool kwargs to the sentinel in case it
155147 # needs to use the socket options for the sentinels themselves
0 commit comments