File tree 1 file changed +3
-8
lines changed
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ def __init__(
159
159
legacy_prepared_statements = None ,
160
160
roles = None ,
161
161
timezone = None ,
162
- defer_connect = True ,
162
+ defer_connect = False ,
163
163
):
164
164
# Automatically assign http_schema, port based on hostname
165
165
parsed_host = urlparse (host , allow_fragments = False )
@@ -224,13 +224,8 @@ def connect(self) -> None:
224
224
test_response = connection_test_request .post ("<not-going-to-be-executed>" )
225
225
if not test_response .ok :
226
226
raise trino .exceptions .TrinoConnectionError (
227
- "error {}{}" .format (
228
- test_response .status_code ,
229
- ": {}" .format (test_response .content )
230
- if test_response .content
231
- else "" ,
232
- )
233
- )
227
+ "error " + str (test_response .status_code ) + (": " + test_response .content if test_response .content else "" ))
228
+
234
229
except RequestException as e :
235
230
raise trino .exceptions .TrinoConnectionError ("connection failed: {}" .format (e ))
236
231
You can’t perform that action at this time.
0 commit comments