File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ def __init__(
159159 legacy_prepared_statements = None ,
160160 roles = None ,
161161 timezone = None ,
162- defer_connect = True ,
162+ defer_connect = False ,
163163 ):
164164 # Automatically assign http_schema, port based on hostname
165165 parsed_host = urlparse (host , allow_fragments = False )
@@ -224,13 +224,8 @@ def connect(self) -> None:
224224 test_response = connection_test_request .post ("<not-going-to-be-executed>" )
225225 if not test_response .ok :
226226 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+
234229 except RequestException as e :
235230 raise trino .exceptions .TrinoConnectionError ("connection failed: {}" .format (e ))
236231
You can’t perform that action at this time.
0 commit comments